]> gcc.gnu.org Git - gcc.git/blob - libphobos/libdruntime/core/stdc/string.d
Add D front-end, libphobos library, and D2 testsuite.
[gcc.git] / libphobos / libdruntime / core / stdc / string.d
1 /**
2 * D header file for C99.
3 *
4 * $(C_HEADER_DESCRIPTION pubs.opengroup.org/onlinepubs/009695399/basedefs/_string.h.html, _string.h)
5 *
6 * Copyright: Copyright Sean Kelly 2005 - 2009.
7 * License: Distributed under the
8 * $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
9 * (See accompanying file LICENSE)
10 * Authors: Sean Kelly
11 * Source: $(DRUNTIMESRC core/stdc/_string.d)
12 * Standards: ISO/IEC 9899:1999 (E)
13 */
14
15 module core.stdc.string;
16
17 version (OSX)
18 version = Darwin;
19 else version (iOS)
20 version = Darwin;
21 else version (TVOS)
22 version = Darwin;
23 else version (WatchOS)
24 version = Darwin;
25
26 extern (C):
27 @system:
28 nothrow:
29 @nogc:
30
31 ///
32 pure void* memchr(return const void* s, int c, size_t n);
33 ///
34 pure int memcmp(scope const void* s1, scope const void* s2, size_t n);
35 ///
36 pure void* memcpy(return void* s1, scope const void* s2, size_t n);
37 version (Windows)
38 {
39 ///
40 int memicmp(scope const char* s1, scope const char* s2, size_t n);
41 }
42 ///
43 pure void* memmove(return void* s1, scope const void* s2, size_t n);
44 ///
45 pure void* memset(return void* s, int c, size_t n);
46
47 ///
48 pure char* strcpy(return char* s1, scope const char* s2);
49 ///
50 pure char* strncpy(return char* s1, scope const char* s2, size_t n);
51 ///
52 pure char* strcat(return char* s1, scope const char* s2);
53 ///
54 pure char* strncat(return char* s1, scope const char* s2, size_t n);
55 ///
56 pure int strcmp(scope const char* s1, scope const char* s2);
57 ///
58 int strcoll(scope const char* s1, scope const char* s2);
59 ///
60 pure int strncmp(scope const char* s1, scope const char* s2, size_t n);
61 ///
62 size_t strxfrm(scope char* s1, scope const char* s2, size_t n);
63 ///
64 pure inout(char)* strchr(return inout(char)* s, int c);
65 ///
66 pure size_t strcspn(scope const char* s1, scope const char* s2);
67 ///
68 pure inout(char)* strpbrk(return inout(char)* s1, scope const char* s2);
69 ///
70 pure inout(char)* strrchr(return inout(char)* s, int c);
71 ///
72 pure size_t strspn(scope const char* s1, scope const char* s2);
73 ///
74 pure inout(char)* strstr(return inout(char)* s1, scope const char* s2);
75 ///
76 char* strtok(return char* s1, scope const char* s2);
77 ///
78 char* strerror(int errnum);
79 version (CRuntime_Glibc)
80 {
81 ///
82 const(char)* strerror_r(int errnum, return char* buf, size_t buflen);
83 }
84 else version (Darwin)
85 {
86 int strerror_r(int errnum, scope char* buf, size_t buflen);
87 }
88 else version (FreeBSD)
89 {
90 int strerror_r(int errnum, scope char* buf, size_t buflen);
91 }
92 else version (NetBSD)
93 {
94 int strerror_r(int errnum, char* buf, size_t buflen);
95 }
96 else version (OpenBSD)
97 {
98 int strerror_r(int errnum, scope char* buf, size_t buflen);
99 }
100 else version (DragonFlyBSD)
101 {
102 int strerror_r(int errnum, scope char* buf, size_t buflen);
103 }
104 else version (Solaris)
105 {
106 int strerror_r(int errnum, scope char* buf, size_t buflen);
107 }
108 else version (CRuntime_Bionic)
109 {
110 ///
111 int strerror_r(int errnum, scope char* buf, size_t buflen);
112 }
113 else version (CRuntime_Musl)
114 {
115 ///
116 int strerror_r(int errnum, scope char *buf, size_t buflen);
117 }
118 else version (CRuntime_UClibc)
119 {
120 ///
121 const(char)* strerror_r(int errnum, return char* buf, size_t buflen);
122 }
123 ///
124 pure size_t strlen(scope const char* s);
125 ///
126 char* strdup(scope const char *s);
This page took 0.039967 seconds and 5 git commands to generate.