UtfString

UtfString template struct

Members

Aliases

ArrayOutType
alias ArrayOutType = dchar[]

Output type alias.

ArrayOutType
alias ArrayOutType = Char[]
Undocumented in source.
OutType
alias OutType = dchar

Output type alias.

OutType
alias OutType = Char[]
Undocumented in source.
This
alias This = typeof(&this)

This alias.

Functions

extract
OutType extract(bool consume)

Extract the next character from the referenced string.

extract
OutType extract(size_t width, bool consume)

Extract the next character from the referenced string.

length
size_t length()

Calculates the number of unicode characters in the referenced string. The calculation requires that the whole string is iterated over.

opApply
int opApply(int delegate(ref size_t, ref size_t, ref OutType) dg)

foreach iterator.

opApply
int opApply(int delegate(ref size_t, ref OutType) dg)

foreach iterator.

opApply
int opApply(int delegate(ref OutType) dg)

foreach iterator.

opIndex
OutType opIndex(size_t index)

opIndex. Extracts the nth unicode character from the referenced string.

opSlice
ArrayOutType opSlice(size_t start, size_t end)

opSlice. Extracts an indexed sequence of unicode characters from the referenced string.

sliceCopy
ArrayOutType sliceCopy(size_t start, size_t end, ArrayOutType output)

Slice / copy. Extracts an indexed sequence of unicode characters from the referenced string and copies them into the provided buffer.

Static functions

extract
OutType extract(Char[] text)

Static method to extract the next character from the passed string.

extract
OutType extract(Char[] text, size_t width)

Static method to extract the next character from the passed string.

extract
OutType extract(Char[] text, size_t width)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

string
Char[] string;

String to iterate over.

Parameters

Char

type of strings to process

pull_dchars

determines the output type of the struct's methods. If true they will all output dchars (ie unicode / utf32 characters), otherwise they output slices of the input string, containing the characters representing a single unicode character.

Meta