UtfString.extract

Extract the next character from the referenced string.

  1. OutType extract(bool consume)
  2. OutType extract(size_t width, bool consume)
    struct UtfString(Char = char, bool pull_dchars = false)
    extract
    (
    out size_t width
    ,
    bool consume = false
    )
  3. OutType extract(Char[] text)
  4. OutType extract(Char[] text, size_t width)
  5. OutType extract(Char[] text, size_t width)

Parameters

width size_t

outputs the width (in terms of the number of characters in the input string) of the extracted character

consume bool

if true, the extracted characters are removed from the string (the start of the slice is advanced)

Return Value

Type: OutType

the extracted character, either as a dchar or a slice into the input string (depending on the pull_dchars template parameter).

Meta