2 * D header file for POSIX's <string.h>.
5 * - The <string.h> header shall define NULL and size_t as described in <stddef.h>.
6 * However, D has builtin `null` and `size_t` is defined in `object`.
8 * See_Also: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/string.h.html
9 * Copyright: D Language Foundation, 2019
10 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
11 * Authors: Mathias 'Geod24' Lang
12 * Standards: The Open Group Base Specifications Issue 7, 2018 edition
13 * Source: $(DRUNTIMESRC core/sys/posix/_string.d)
15 module core
.sys
.posix
.string
;
22 /// Exposes `locale_t` as defined in `core.sys.posix.locale` (`<locale.h>`)
23 public import core
.sys
.posix
.locale
: locale_t
;
26 * Exposes the C99 functions
28 * C extensions and XSI extensions are missing
30 public import core
.stdc
.string
;
32 /// Copy string until character found
33 void* memccpy(return scope void* dst
, scope const void* src
, int c
, size_t n
) pure;
34 /// Copy string (including terminating '\0')
35 char* stpcpy(return scope char* dst
, scope const char* src
) pure;
37 char* stpncpy(return scope char* dst
, const char* src
, size_t len
) pure;
38 /// Compare strings according to current collation
39 int strcoll_l(scope const char* s1
, scope const char* s2
, locale_t locale
);
41 char* strerror_l(int, locale_t
);
42 /// Find length of string up to `maxlen`
43 size_t
strnlen(scope const char* str, size_t maxlen
) pure;
44 /// System signal messages
45 const(char)* strsignal(int);
46 /// Isolate sequential tokens in a null-terminated string
47 char* strtok_r(return scope char* str, scope const char* sep
, char** context
) pure;
48 /// Transform a string under locale
49 size_t
strxfrm_l(char* s1
, scope const char* s2
, size_t n
, locale_t locale
);