API reference
Preparing search index…

Native Rml::StringUtilities with UTF-8 byte and codepoint positions.

ASCII folding, RML entity decoding and quote rules are the native rules. Reuse StringView for cached batched offset lookup instead of rescanning text.

Source & inheritance
Member directory23

Methods

Methods

  • Read native BytesUTF8 for one unsigned codepoint.

    Parameters

    character
    number

    Unsigned 32-bit codepoint.

    Returns

    number

    Encoded byte count, or zero above the native Unicode range.

    Source & inheritance
  • Convert a byte-offset batch in one native call.

    Parameters

    value

    Retained StringView with lazily cached boundaries.

    offsets
    Int32Array

    Fixed unshared input Int32Array.

    outputOptional
    Int32Array

    Same-sized reusable output, including overlapping input.

    Returns

    Int32Array

    Supplied output, or an independently owned native snapshot.

    Source & inheritance
  • Resolve native byte-to-character offsets using a cached native index.

    Parameters

    value

    Reuse a StringView to avoid rebuilding the index.

    offset
    number

    Signed 32-bit byte offset; interior bytes round forward.

    Returns

    number

    Native codepoint offset, distinct from JavaScript UTF-16.

    Source & inheritance
  • Convert a character-offset batch in one native call.

    Parameters

    value

    Retained StringView with lazily cached boundaries.

    offsets
    Int32Array

    Fixed unshared input Int32Array.

    outputOptional
    Int32Array

    Same-sized reusable output, including overlapping input.

    Returns

    Int32Array

    Supplied output, or an independently owned native snapshot.

    Source & inheritance
  • Resolve native character-to-byte offsets using a cached native index.

    Parameters

    value

    Reuse a StringView to avoid rebuilding the index.

    offset
    number

    Signed 32-bit codepoint offset, clamped to the view.

    Returns

    number

    Native byte offset.

    Source & inheritance
  • Expand native lists, optionally using custom opening and closing quotes.

    Parameters

    value

    List text.

    delimiter
    string = ','

    ASCII delimiter, default comma.

    quoteOrIgnore
    string | boolean = false

    Opening quote, or ignore-repeated flag.

    unquoteOptional
    string

    Closing quote for the custom overload.

    ignoreRepeatedDelimiters
    boolean = false

    Omit empty interior entries.

    Returns

    string[]

    Native expanded entries; default quotes are removed.

    Source & inheritance
  • Apply native IsWhitespace to CR, LF, space and tab.

    Parameters

    value
    string

    One ASCII byte.

    Returns

    boolean

    Native whitespace membership.

    Source & inheritance
  • Append native JoinString output to an optional initial string.

    Parameters

    values
    readonly string[]

    Input string list.

    delimiter
    string = ','

    ASCII separator, default comma; NUL adds no separator.

    initial
    string = ''

    Native destination's initial contents.

    Returns

    string

    Native appended string.

    Source & inheritance
  • Apply native Replace for text or numeric byte characters.

    Parameters

    value

    Source text.

    search
    string | number

    Text or byte from zero to 255.

    replacement
    string | number

    Same kind of value as search.

    Returns

    string

    Replaced text; an empty string search leaves the input unchanged.

    Source & inheritance
  • Resolve native SeekBackwardUTF8 as a safe numeric byte offset.

    Parameters

    value

    Nonempty UTF-8 byte view.

    offset
    number

    Dereferenceable byte offset.

    Returns

    number

    First preceding non-continuation position, or minus one.

    Source & inheritance
  • Resolve native SeekForwardUTF8 as a checked byte offset.

    Parameters

    value

    UTF-8 byte view.

    offset
    number

    Position from zero through the byte end.

    Returns

    number

    First non-continuation position at or after offset.

    Source & inheritance
  • Read native ToCharacter at an explicit byte offset.

    Parameters

    value

    UTF-8 text or partial byte view.

    offset
    number = 0

    Dereferenceable byte offset.

    Returns

    number

    Native codepoint; invalid or truncated bytes decode as zero.

    Source & inheritance
  • Apply either native ToUTF8 overload in one call.

    Parameters

    characters
    number | Uint32Array

    Unsigned codepoint or fixed unshared Uint32Array.

    Returns

    string

    Native UTF-8 text; invalid codepoints are omitted with a warning.

    Source & inheritance
  • Apply TrimTrailingDotZeros to a checked decimal representation.

    Parameters

    value
    string

    Signed or unsigned decimal with a dot and digits.

    Returns

    string

    Text without trailing decimal zeroes or an empty decimal dot.

    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0