劉康民 > Rubyish > Rubyish::String

Download:
Rubyish-0.32.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

Rubyish::String - String (class)

new($scalar) #=> string object

constructor

    $string = Rubyish::String->new;             #=> bless( do{\(my $o = '')}, 'Rubyish::String' )
    $string = Rubyish::String->new("hello");    #=> bless( do{\(my $o = 'hello')}, 'Rubyish::String' )
    $string = String("hello");                  # do the same

replace($scalar) #=> $instance

replace content

    $string = Rubyish::String->new("hello");    #=> bless( do{\(my $o = 'hello')}, 'Rubyish::String' )
    $string->replace("world")                   #=> bless( do{\(my $o = 'world')}, 'Rubyish::String' )

inspect

Not Documented

gsub($pattern, $replacement) #=> new_str

    $string = String("hello")
    $string->gsub(qr/ello/, "i")    #=> hi

+

syntax highlighting: