struct

Similar::StringWrapper

Inherits Similar::DiffableStr < Struct < Value < Object

Zero-cost wrapper for String to satisfy DiffableStr.

Constructors

new(value : String)
Source

Instance methods

==(other : self) : Bool
Source
[](index : Int32) : Char
Source
hash(hasher)

See Object#hash(hasher)

Source
size
Source
slice(range : Range(Int32, Int32)) : self
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
value
Source