struct Crysterm::StringIndex

Overview

A wrapper around indexable objects that returns nil on [-idx] rather than [idx] counted from the back.

It is needed in drawing routines where index is often offset by a certain value and expected that all indexes < 0 will return nil.

Defined in:

widget_content.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(object : String) #

[View source]

Instance Method Detail

def [](i : Int) #

[View source]
def [](range : Range) #

[View source]
def []?(i : Int) #

[View source]
def size #

[View source]