core.sys.posix.string

D header file for POSIX's <string.h>.

Note: - The <string.h> header shall define NULL and size_t as described in <stddef.h>. However, D has builtin null and size_t is defined in object.

Public Imports

core.stdc.string
public import core.stdc.string;

Exposes the C99 functions

Members

Aliases

locale_t (from core.sys.posix.locale)
alias locale_t = _LC_locale_t** via public import core.sys.posix.locale : locale_t;

Exposes locale_t as defined in core.sys.posix.locale (<locale.h>)

Functions

memccpy
void* memccpy(void* dst, void* src, int c, size_t n)

Copy string until character found

stpcpy
char* stpcpy(char* dst, char* src)
stpncpy
char* stpncpy(char* dst, char* src, size_t len)

Copy string (including terminating '\0')

strcoll_l
int strcoll_l(char* s1, char* s2, locale_t locale)

Compare strings according to current collation

strerror_l
char* strerror_l(int , locale_t )
strndup
char* strndup(char* str, size_t len)

Save a copy of a string

strnlen
size_t strnlen(char* str, size_t maxlen)

Find length of string up to maxlen

strsignal
const(char)* strsignal(int )

System signal messages

strtok_r
char* strtok_r(char* str, char* sep, char** context)

Isolate sequential tokens in a null-terminated string

strxfrm_l
size_t strxfrm_l(char* s1, char* s2, size_t n, locale_t locale)

Transform a string under locale

See Also

Meta

Standards

The Open Group Base Specifications Issue 7, 2018 edition

Authors

Mathias 'Geod24' Lang