home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue2 / SDL.ARC / !gcc / include / libscl / h / string < prev    next >
Encoding:
Text File  |  2004-09-05  |  3.0 KB  |  100 lines

  1. /* string.h
  2.  
  3.    For use with the GNU compilers and the SharedCLibrary.
  4.    (c) Copyright 1997, Nick Burrett.  */
  5.  
  6. #ifndef __STRING_H
  7. #define __STRING_H
  8.  
  9. #ifndef __STDDEF_H
  10. #include <stddef.h>
  11. #endif
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. /* Copy n bytes from src to dest.  */
  18. extern void *memcpy (void *__dest, const void *__src, size_t __n);
  19.  
  20. /* Copy n bytes from src to dest, guaranteeing correct
  21.    behaviour for overlapping data.  */
  22. extern void *memmove (void *__dest, const void *__src, size_t __n);
  23.  
  24. /* Copy src to dest. */
  25. extern char *strcpy (char *__dest, const char *__src);
  26.  
  27. /* Copy no more than n chars of src to dest.  */
  28. extern char *strncpy (char *__dest, const char *__src, size_t __n);
  29.  
  30. /* Append src onto dest.  */
  31. extern char *strcat (char *__dest, const char *__src);
  32.  
  33. /* Append no more than n chars from src to dest. */
  34. extern char *strncat (char *__dest, const char *__src, size_t __n);
  35.  
  36. /* Compare n bytes of s1 and s2.  */
  37. extern int memcmp (const void *__s1, const void *__s2, size_t __n);
  38.  
  39. /* Compare s1 and s2.  */
  40. extern int strcmp (const char *__s1, const char *__s2);
  41.  
  42. /* Compare n chars of s1 and s2.  */
  43. extern int strncmp (const char *__s1, const char *__s2, size_t __n);
  44.  
  45. /* Similar to strcmp but uses the collating sequence of the
  46.    current locale for collation (LC_COLLATE).  */
  47. extern int strcoll (const char *__s1, const char *__s2);
  48.  
  49. /* Transforms 'string' using the collation transformation
  50.    determined by the locale currently selected for collation,
  51.    and stores the transformed string in the array 'to'. Up
  52.    to 'size' characters are stored (including terminating null
  53.    character).  */
  54. extern size_t strxfrm (char *__to, const char *__string, size_t __size);
  55.  
  56. /* Search n bytes of s for c.  */
  57. extern void *memchr (const void *__s, int __c, size_t __n);
  58.  
  59. /* Find the first occurrence of c in s. */
  60. extern char *strchr (const char *__s, int __c);
  61.  
  62. /* Return the length of the initial segment of s that consists
  63.    entirely of chars not in reject.  */
  64. extern size_t strcspn (const char *__s, const char *__reject);
  65.  
  66. /* Find the first occurence in s of any char in accept.  */
  67. extern char *strpbrk (const char *__s, const char *__accept);
  68.  
  69. /* Find the last occurrence of c in s.  */
  70. extern char *strrchr (const char *__s, int __c);
  71.  
  72. /* Return the length of the initial segment of s that consists
  73.    entirely of chars in accept.  */
  74. extern size_t strspn (const char *__s, const char *__accept);
  75.  
  76. /* Find the first occurrence of s in s1.  */
  77. extern char *strstr (const char *__s, const char *__s1);
  78.  
  79. /* Divide s into tokens separated by chars in delim.  */
  80. extern char *strtok (char *__s, const char *__delim);
  81.  
  82. /* Set n bytes of s to c.  */
  83. extern void *memset (void *__s, int __c, size_t __n);
  84.  
  85. /* Return the descriptive error message string for an error code.  */
  86. extern char *strerror (int __errnum);
  87.  
  88. /* Return the length of s. */
  89. extern size_t strlen (const char *__s);
  90.  
  91. /* Duplicate s, returning an identical malloc'd string.  */
  92. extern char *strdup (const char *__s);
  93.  
  94.  
  95. #ifdef __cplusplus
  96. }
  97. #endif
  98.  
  99. #endif
  100.