1 /** 2 * D header file for C99. 3 * 4 * Copyright: Public Domain 5 * License: Public Domain 6 * Authors: Sean Kelly 7 * Standards: ISO/IEC 9899:1999 (E) 8 */ 9 module tango.stdc..string; 10 11 private import tango.stdc.stddef; 12 13 extern (C): 14 15 void* memchr(in void* s, int c, size_t n); 16 int memcmp(in void* s1, in void* s2, size_t n); 17 void* memcpy(void* s1, in void* s2, size_t n); 18 void* memmove(void* s1, in void* s2, size_t n); 19 void* memset(void* s, int c, size_t n); 20 21 char* strcpy(char* s1, in char* s2); 22 char* strncpy(char* s1, in char* s2, size_t n); 23 char* strcat(char* s1, in char* s2); 24 char* strncat(char* s1, in char* s2, size_t n); 25 int strcmp(in char* s1, in char* s2); 26 int strcoll(in char* s1, in char* s2); 27 int strncmp(in char* s1, in char* s2, size_t n); 28 size_t strxfrm(char* s1, in char* s2, size_t n); 29 char* strchr(in char* s, int c); 30 size_t strcspn(in char* s1, in char* s2); 31 char* strpbrk(in char* s1, in char* s2); 32 char* strrchr(in char* s, int c); 33 size_t strspn(in char* s1, in char* s2); 34 char* strstr(in char* s1, in char* s2); 35 char* strtok(char* s1, in char* s2); 36 char* strerror(int errnum); 37 size_t strlen(in char* s); 38 39 version( Posix ) 40 { 41 char* strdup(char*); 42 char *strsignal(int sig); 43 } 44 45 wchar_t* wmemchr(in wchar_t* s, wchar_t c, size_t n); 46 int wmemcmp(in wchar_t* s1, in wchar_t* s2, size_t n); 47 wchar_t* wmemcpy(wchar_t* s1, in wchar_t* s2, size_t n); 48 wchar_t* wmemmove(wchar_t*s1, in wchar_t* s2, size_t n); 49 wchar_t* wmemset(wchar_t* s, wchar_t c, size_t n); 50 51 wchar_t* wcscpy(wchar_t* s1, in wchar_t* s2); 52 wchar_t* wcsncpy(wchar_t* s1, in wchar_t* s2, size_t n); 53 wchar_t* wcscat(wchar_t* s1, in wchar_t* s2); 54 wchar_t* wcsncat(wchar_t* s1, in wchar_t* s2, size_t n); 55 int wcscmp(in wchar_t* s1, in wchar_t* s2); 56 int wcscoll(in wchar_t* s1, in wchar_t* s2); 57 int wcsncmp(in wchar_t* s1, in wchar_t* s2, size_t n); 58 size_t wcsxfrm(wchar_t* s1, in wchar_t* s2, size_t n); 59 wchar_t* wcschr(in wchar_t* s, wchar_t c); 60 size_t wcscspn(in wchar_t* s1, in wchar_t* s2); 61 wchar_t* wcspbrk(in wchar_t* s1, in wchar_t* s2); 62 wchar_t* wcsrchr(in wchar_t* s, wchar_t c); 63 size_t wcsspn(in wchar_t* s1, in wchar_t* s2); 64 wchar_t* wcsstr(in wchar_t* s1, in wchar_t* s2); 65 wchar_t* wcstok(wchar_t* s1, in wchar_t* s2, wchar_t** ptr); 66 size_t wcslen(wchar_t* s); 67 68 alias int mbstate_t; 69 70 wint_t btowc(int c); 71 int wctob(wint_t c); 72 int mbsinit(in mbstate_t* ps); 73 size_t mbrlen(in char* s, size_t n, mbstate_t* ps); 74 size_t mbrtowc(wchar_t* pwc, in char* s, size_t n, mbstate_t* ps); 75 size_t wcrtomb(char* s, wchar_t wc, mbstate_t* ps); 76 size_t mbsrtowcs(wchar_t* dst, in char** src, size_t len, mbstate_t* ps); 77 size_t wcsrtombs(char* dst, in wchar_t** src, size_t len, mbstate_t* ps);