Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: Converting Directory Names to Strings
Austin Ziegler
7/7/2006 2:45:00 PM
On 7/6/06, Nathan Olberding <nathan.olberding@gmail.com> wrote:
> Phillip Hutchings wrote:
> > Ruby doesn't provide a character data type, so without this you'd be
> > unable to find the character value for it.
> What I meant to say is, why not free up x[0] (seems more logical, at
> least to me, to use it for tiny strings) and use something like
> x[0].ascii or x[0].character_code to return an array of character codes
> for all characters in the given string?
This will be offered in a future Ruby. Look at the long and
often-contentious thread recently about Unicode to see what will be
happening on that end. In Ruby 1.8, "ABC"[0] will return 65; in Ruby
1.9+m17nString (and Ruby 2.0), "ABC"[0] will return "A".
-austin
--
Austin Ziegler * halostatue@gmail.com *
http://www.halo...
* austin@halostatue.ca *
http://www.halo...
feed/
* austin@zieglers.ca
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Converting Directory Names to Strings
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password