class CharArray

Overview

This is used as an alternative to String in cases where we need constant time random access and ranges of characters in the string.

Defined in:

char_array.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(str : String) #

[View source]

Instance Method Detail

def [](start_index : Int, count : Int) : String #

[View source]
def [](index : Int) : Char #

[View source]
def [](range : Range(Int32, Int32)) : String #

[View source]
def size #

[View source]
def to_s #
Description copied from class Object

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.


[View source]