method

codepoints

v1_9_1_378 - Show latest stable - Class: String
codepoints()
public

Returns an enumerator that gives the Integer ordinal of each character in the string, also known as a codepoint when applied to Unicode strings. If a block is given, it iterates over each character in the string.

"foo\u0635".codepoints.to_a   #=> [102, 111, 111, 1589]