You can use
a=“hello there”
b=a[2…-1]
p b => “llo there”
a[2…-2]
chops off from the end.
Best regards,
Axel
You can use
a=“hello there”
b=a[2…-1]
p b => “llo there”
a[2…-2]
chops off from the end.
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