method
each_codepoint
v2_2_9 -
Show latest stable
- Class:
String
each_codepoint()public
Passes the Integer ordinal of each character in str, also known as a codepoint when applied to Unicode strings to the given block.
If no block is given, an enumerator is returned instead.
"hello\u0639".each_codepoint {|c| print c, ' ' }
produces:
104 101 108 108 111 1593