nulib.string

nogc strings

Members

Aliases

ndstring
alias ndstring = StringImpl!(dchar)

A @nogc UTF-32 string

nstring
alias nstring = StringImpl!(char)

A @nogc UTF-8 string

nwstring
alias nwstring = StringImpl!(wchar)

A @nogc UTF-16 string

Enums

StringCharSize
eponymoustemplate StringCharSize(T)

Gets the size of the element in a string-ish type in bytes.

isSomeCString
eponymoustemplate isSomeCString(T)

Gets whether the provided type is some type of null terminated C string.

isSomeChar
eponymoustemplate isSomeChar(T)

Gets whether the provided type is a character

isSomeDString
eponymoustemplate isSomeDString(T)

Gets whether the provided type is some type of D string slice.

isSomeNString
eponymoustemplate isSomeNString(T)

Gets whether the provided type is some type of nstring.

isSomeSafeString
eponymoustemplate isSomeSafeString(T)

Gets whether the provided type is some type of string which is length denoted and therefore "safe"

isSomeString
eponymoustemplate isSomeString(T)

Gets whether the provided type is some type of string.

isStringable
eponymoustemplate isStringable(T)

Gets whether T is convertible to any form of nstring

Functions

fromStringz
inout(T)[] fromStringz(inout(T)* str)

Gets a slice from a null-terminated string.

nu_strlen
size_t nu_strlen(inout(T)* str)

Gets the length of a null-terminated string.

sliceof
auto sliceof(T str)

Gets the slice equivalent of the input string.

Structs

StringImpl
struct StringImpl(T)

The underlying implementation of a numem string.

Templates

StringCharType
template StringCharType(T)

Gets the type of the element in a string-ish type.

Meta

Authors

Luna Nielsen