struct

Nucleoc::Utf32Str

Inherits Struct < Value < Object

Immutable UTF-32 view used by the matcher

Constructors

encode(str : String) : Utf32Str
Source
new(str : String, buf : Array(Char)) : Utf32Str
Source
new(bytes : Slice(UInt8))
Source
new(chars : Slice(Char))
Source
new(str : String)
Source

Instance methods

==(other : Utf32Str) : Bool
Source
==(other : String) : Bool
Source
ascii?
Source
chars
Source
each
Source
each_char
Source
empty?
Source
first
Source
get(n : Int32) : Char | Nil
Source
last
Source
leading_white_space
Source
size
Source
slice(range : Range(Int32, Int32)) : Utf32Str
Source
slice_u32(range : Range(UInt32, UInt32)) : Utf32Str
Source
to_s(io : IO) : Nil

Same as #inspect(io).

Source
to_s

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source
trailing_white_space
Source

Nested types