summaryrefslogtreecommitdiff
path: root/doc/string/codepoints.rdoc
blob: 0c55d3f4b95c35958acdd6bfbabc103d1059f0b3 (plain)
1
2
3
4
5
6
Returns an array of the codepoints in +self+;
each codepoint is the integer value for a character:

  'hello'.codepoints     # => [104, 101, 108, 108, 111]
  'тест'.codepoints      # => [1090, 1077, 1089, 1090]
  'こんにちは'.codepoints # => [12371, 12435, 12395, 12385, 12399]