ruby/doc/string/ord.rdoc

7 строки
185 B
Plaintext

Returns the integer ordinal of the first character of +self+:
'h'.ord # => 104
'hello'.ord # => 104
'тест'.ord # => 1090
'こんにちは'.ord # => 12371