132
|
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(void* s, int c, size_t n);
|
|
16 int memcmp(void* s1, void* s2, size_t n);
|
|
17 void* memcpy(void* s1, void* s2, size_t n);
|
|
18 void* memmove(void* s1, void* s2, size_t n);
|
|
19 void* memset(void* s, int c, size_t n);
|
|
20
|
|
21 char* strcpy(char* s1, char* s2);
|
|
22 char* strncpy(char* s1, char* s2, size_t n);
|
|
23 char* strcat(char* s1, char* s2);
|
|
24 char* strncat(char* s1, char* s2, size_t n);
|
|
25 int strcmp(char* s1, char* s2);
|
|
26 int strcoll(char* s1, char* s2);
|
|
27 int strncmp(char* s1, char* s2, size_t n);
|
|
28 size_t strxfrm(char* s1, char* s2, size_t n);
|
|
29 char* strchr(char* s, int c);
|
|
30 size_t strcspn(char* s1, char* s2);
|
|
31 char* strpbrk(char* s1, char* s2);
|
|
32 char* strrchr(char* s, int c);
|
|
33 size_t strspn(char* s1, char* s2);
|
|
34 char* strstr(char* s1, char* s2);
|
|
35 char* strtok(char* s1, char* s2);
|
|
36 char* strerror(int errnum);
|
|
37 size_t strlen(char* s);
|
|
38
|
|
39 version( Posix )
|
|
40 {
|
|
41 char* strdup(char*);
|
|
42 }
|
|
43
|
|
44 wchar_t* wmemchr(wchar_t* s, wchar_t c, size_t n);
|
|
45 int wmemcmp(wchar_t* s1, wchar_t* s2, size_t n);
|
|
46 wchar_t* wmemcpy(wchar_t* s1, wchar_t* s2, size_t n);
|
|
47 wchar_t* wmemmove(wchar_t*s1, wchar_t*s2, size_t n);
|
|
48 wchar_t* wmemset(wchar_t* s, wchar_t c, size_t n);
|
|
49
|
|
50 wchar_t* wcscpy(wchar_t* s1, wchar_t* s2);
|
|
51 wchar_t* wcsncpy(wchar_t* s1, wchar_t* s2, size_t n);
|
|
52 wchar_t* wcscat(wchar_t* s1, wchar_t* s2);
|
|
53 wchar_t* wcsncat(wchar_t* s1, wchar_t* s2, size_t n);
|
|
54 int wcscmp(wchar_t*s1, wchar_t*s2);
|
|
55 int wcscoll(wchar_t*s1, wchar_t*s2);
|
|
56 int wcsncmp(wchar_t*s1, wchar_t*s2, size_t n);
|
|
57 size_t wcsxfrm(wchar_t* s1, wchar_t* s2, size_t n);
|
|
58 wchar_t* wcschr(wchar_t* s, wchar_t c);
|
|
59 size_t wcscspn(wchar_t*s1, wchar_t*s2);
|
|
60 wchar_t* wcspbrk(wchar_t*s1, wchar_t*s2);
|
|
61 wchar_t* wcsrchr(wchar_t* s, wchar_t c);
|
|
62 size_t wcsspn(wchar_t*s1, wchar_t*s2);
|
|
63 wchar_t* wcsstr(wchar_t*s1, wchar_t*s2);
|
|
64 wchar_t* wcstok(wchar_t* s1, wchar_t* s2, wchar_t** ptr);
|
|
65 size_t wcslen(wchar_t* s);
|
|
66
|
|
67 alias int mbstate_t;
|
|
68
|
|
69 wint_t btowc(int c);
|
|
70 int wctob(wint_t c);
|
|
71 int mbsinit(mbstate_t*ps);
|
|
72 size_t mbrlen(char* s, size_t n, mbstate_t* ps);
|
|
73 size_t mbrtowc(wchar_t* pwc, char* s, size_t n, mbstate_t* ps);
|
|
74 size_t wcrtomb(char* s, wchar_t wc, mbstate_t* ps);
|
|
75 size_t mbsrtowcs(wchar_t* dst, char** src, size_t len, mbstate_t* ps);
|
|
76 size_t wcsrtombs(char* dst, wchar_t** src, size_t len, mbstate_t* ps);
|