you can use
text=“my unfinishing text with an unknown last character”
result=text[-1].chr
p result => r
you can use
text=“my unfinishing text with an unknown last character”
result=text[-1].chr
p result => r
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