34,333
edits
Changes
→Convert an Character to the ASCII Character Code
=== Convert an Character to the ASCII Character Code ===
For Ruby version 1.8 or earlier:
<pre>
Integer (?e)
=> 101
</pre>
For Ruby version 1.9 or later:
<pre>
"e".getbyte(0) #ASCII to Integer
=> 101
</pre>