Changes

Jump to: navigation, search

Ruby Number Classes and Conversions

134 bytes added, 18:02, 7 July 2009
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>

Navigation menu