Debian Codegraph @

libphobos/libdruntime/core/sys/posix/strings.d

raw
1 /**
2 * D header file for POSIX's <strings.h>.
3 *
4 * Note: Do not mistake this module for <string.h> (singular),
5 * available at `core.sys.posix.string`.
6 *
7 * See_Also: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/strings.h.html
8 * Copyright: D Language Foundation, 2019
9 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
10 * Authors: Mathias 'Geod24' Lang
11 * Standards: The Open Group Base Specifications Issue 7, 2018 edition
12 * Source: $(DRUNTIMESRC core/sys/posix/_strings.d)
13 */
14 module core.sys.posix.strings;
15
16 version (Posix):
17 extern(C):
18 nothrow:
19 @nogc:
20
21 ///
22 public import core.sys.posix.locale : locale_t;
23
24 /// Find first bit set in a word
25 int ffs(int i) @safe pure;
26 /// Compare two strings ignoring case
27 int strcasecmp(scope const char* s1, scope const char* s2);
28 /// Compare two strings ignoring case, with the specified locale
29 int strcasecmp_l(scope const char* s1, scope const char* s2, scope locale_t locale);
30 /// Compare two strings ignoring case, up to n characters
31 int strncasecmp(scope const char* s1, scope const char* s2, size_t n);
32 /// Compare two strings ignoring case, with the specified locale, up to n characters
33 int strncasecmp_l(scope const char* s1, const char* s2, size_t n, locale_t locale);