[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: [newbie] upper to lower first letter of a word

Mark J. Reed

9/23/2003 9:18:00 PM

On Wed, Sep 24, 2003 at 06:07:08AM +0900, dblack@superlink.net wrote:
> On Wed, 24 Sep 2003, Yvon Thoraval wrote:
> > tanxs, i don't remember (from Perl) what's the meaning of this "s" ?
> It's different in Perl and Ruby. In Perl, it means: treat the string
> as a single line, so that '.' matches newline. In Ruby, it affects
> the encoding.... I wish I could give a more knowledgeable account,
> but I've never actually used it myself and can't seem to dig up
> documentation.
>

According to the Pickaxe, or at least the online version thereof
(my dead-trees vesion is at home), /s means to use the SJIS
(Shift-Japanese Information Systems or something like that) multibyte
text encoding. Similarly, /e means to use EUC, and /u means to use
UTF-8. So /u is probably a better bet than /s for Yvon.


http://www.rubycentral.com/book/ref_c_regexp.html#...

-Mark