string.pxd 2.0 KB

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