On 15-jun-2006, at 6:13, Suraj N. Kurapati wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Dae San Hwang wrote: >> The reason I'm differentiating between 'size' and 'length' is because >> some libraries (like rails) depend on them returning the byte size of >> the string. Maybe we can establish a customs that 'size' for byte >> size >> and 'length' for the number of characters. Same reasoning goes for >> '[]' >> and 'slice'. > > Good idea. This separation of 'length' and 'size' methods is quite > reasonable, in my opinion. To the original poster - frankly I don't see the point of doing this all over again. If you want to have unicode handling that way just grab it from my plugin. It's just that when you have to work with external libraries they will not cooperate. I was using this String class in the wild for a few months, so trust me. It's not simply because I "felt" like removing this functionality - it simply Broke Alot Of Stuff In A Variety Of Subtle Ways. Separation of "size" and "length" is sensless because they are aliases in Ruby. It would be sensible to have "byte_" prefixed methods for byte access, just as I had in my hacks plugin a while ago. It worked too. What is this? Curiosity or you just want to delve into the dirty swamp of character handling for pure entertainment? -- Julian 'Julik' Tarkhanov please send all personal mail to me at julik.nl