Ruby/Number/Convert to Char

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск

Convert integer to char

120.chr # => "x"



Get next from a char converted from an integer

120.chr.next # => "y"



Get the corresponding char

97.chr # => "a"
98.chr # => "b"
125.chr # => "}"
126.chr # => "~"
127.chr # => "\177"