1 # 7.21 String handling <string.h>
4 # deprecated backwards compatibility declarations
5 ctypedef const char const_char "const char"
6 ctypedef const signed char const_schar "const signed char"
7 ctypedef const unsigned char const_uchar "const unsigned char"
8 ctypedef const void const_void "const void"
10 cdef extern from "string.h" nogil:
12 void *memcpy (void *pto, const void *pfrom, size_t size)
13 void *memmove (void *pto, const void *pfrom, size_t size)
14 void *memset (void *block, int c, size_t size)
15 int memcmp (const void *a1, const void *a2, size_t size)
16 void *memchr (const void *block, int c, size_t size)
18 void *memchr (const void *block, int c, size_t size)
19 void *memrchr (const void *block, int c, size_t size)
21 size_t strlen (const char *s)
22 char *strcpy (char *pto, const char *pfrom)
23 char *strncpy (char *pto, const char *pfrom, size_t size)
24 char *strdup (const char *s)
25 char *strndup (const char *s, size_t size)
26 char *strcat (char *pto, const char *pfrom)
27 char *strncat (char *pto, const char *pfrom, size_t size)
29 int strcmp (const char *s1, const char *s2)
30 int strcasecmp (const char *s1, const char *s2)
31 int strncmp (const char *s1, const char *s2, size_t size)
32 int strncasecmp (const char *s1, const char *s2, size_t n)
34 int strcoll (const char *s1, const char *s2)
35 size_t strxfrm (char *pto, const char *pfrom, size_t size)
37 char *strerror (int errnum)
39 char *strchr (const char *string, int c)
40 char *strrchr (const char *string, int c)
42 char *strstr (const char *haystack, const char *needle)
43 char *strcasestr (const char *haystack, const char *needle)
45 size_t strcspn (const char *string, const char *stopset)
46 size_t strspn (const char *string, const char *set)
47 char * strpbrk (const char *string, const char *stopset)
49 char *strtok (char *newstring, const char *delimiters)
50 char *strsep (char **string_ptr, const char *delimiter)