Thursday, February 09, 2006

String in Ruby:Strings Manual

Lots of Ruby String Goodies:

"A String object holds and manipulates an arbitrary sequence of bytes, typically representing characters. String objects may be created using String::new or as literals (see page 204).Because of aliasing issues, users of strings should be aware of the methods that modify the contents of a String object. Typically, methods with names ending in ``!'' modify their receiver, while those without a ``!'' return a new String. However, there are exceptions, such as String"


mixins: <, <=, ==, >=, >, between?
class methods: new String.new( aString ) -> aNewString
instance methods: % str % arg -> aString
* str * anInteger -> aString
+ str + aString -> aNewString
<<
str
<< aFixnum -> str
str << anObject -> str
<=> str <=> aString -> -1, 0, +1
== str == anObject -> true or false

and more

0 Comments:

Post a Comment

<< Home

eXTReMe Tracker