string="#ip 127.0.0.1"
new_string=string[3…-1]
=>" 127.0.0.1"
(Indexing in Ruby starts at 0 …)
Best regards,
Axel
string="#ip 127.0.0.1"
new_string=string[3…-1]
=>" 127.0.0.1"
(Indexing in Ruby starts at 0 …)
Best regards,
Axel
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs