Previous: Character and String Functions in C Locale, Up: Strings [Contents][Index]
This table summarizes the API functions available for strings, in POSIX and in Gnulib.
unibyte strings only | assume C locale | multibyte strings | multibyte strings with NULs | wide character strings | 32-bit wide character strings |
---|---|---|---|---|---|
strlen | strlen | mbslen | string_desc_length | wcslen | u32_strlen |
strnlen | strnlen | mbsnlen | – | wcsnlen | u32_strnlen , u32_mbsnlen |
strcmp | strcmp | strcmp | string_desc_cmp | wcscmp | u32_strcmp |
strncmp | strncmp | strncmp | – | wcsncmp | u32_strncmp |
strcasecmp | strcasecmp | mbscasecmp | – | wcscasecmp | u32_casecmp |
strncasecmp | strncasecmp | mbsncasecmp , mbspcasecmp | – | wcsncasecmp | u32_casecmp |
strcoll | strcmp | strcoll | – | wcscoll | u32_strcoll |
strxfrm | – | strxfrm | – | wcsxfrm | – |
strchr | strchr | mbschr | string_desc_index | wcschr | u32_strchr |
strrchr | strrchr | mbsrchr | string_desc_last_index | wcsrchr | u32_strrchr |
strstr | strstr | mbsstr | string_desc_contains | wcsstr | u32_strstr |
strcasestr | strcasestr | mbscasestr | – | – | – |
strspn | strspn | mbsspn | – | wcsspn | u32_strspn |
strcspn | strcspn | mbscspn | – | wcscspn | u32_strcspn |
strpbrk | strpbrk | mbspbrk | – | wcspbrk | u32_strpbrk |
strtok_r | strtok_r | mbstok_r | – | wcstok | u32_strtok |
strsep | strsep | mbssep | – | – | – |
strcpy | strcpy | strcpy | string_desc_copy | wcscpy | u32_strcpy |
stpcpy | stpcpy | stpcpy | – | wcpcpy | u32_stpcpy |
strncpy | strncpy | strncpy | – | wcsncpy | u32_strncpy |
stpncpy | stpncpy | stpncpy | – | wcpncpy | u32_stpncpy |
strcat | strcat | strcat | string_desc_concat | wcscat | u32_strcat |
strncat | strncat | strncat | – | wcsncat | u32_strncat |
free | free | free | string_desc_free | free | free |
strdup | strdup | strdup | string_desc_copy | wcsdup | u32_strdup |
strndup | strndup | strndup | – | – | – |
mbswidth | mbswidth | mbswidth | – | wcswidth | c32swidth , u32_strwidth |
strtol | strtol | strtol | – | – | – |
strtoul | strtoul | strtoul | – | – | – |
strtoll | strtoll | strtoll | – | – | – |
strtoull | strtoull | strtoull | – | – | – |
strtoimax | strtoimax | strtoimax | – | wcstoimax | – |
strtoumax | strtoumax | strtoumax | – | wcstoumax | – |
strtof | – | strtof | – | – | – |
strtod | c_strtod | strtod | – | – | – |
strtold | c_strtold | strtold | – | – | – |
strfromf | – | strfromf | – | – | – |
strfromd | – | strfromd | – | – | – |
strfroml | – | strfroml | – | – | – |
– | – | – | – | mbstowcs | mbstoc32s |
– | – | – | – | mbsrtowcs | mbsrtoc32s |
– | – | – | – | mbsnrtowcs | mbsnrtoc32s |
– | – | – | – | wcstombs | c32stombs |
– | – | – | – | wcsrtombs | c32srtombs |
– | – | – | – | wcsnrtombs | c32snrtombs |
Previous: Character and String Functions in C Locale, Up: Strings [Contents][Index]