Answers for "how to remove the last character of a string in ruby"

0

ruby remove last element of string

'abc1234'.chomp(4) # => 'abc123'
'toto'.chomp('to') # => 'to'
Posted by: Guest on March-03-2021

Code answers related to "how to remove the last character of a string in ruby"

Browse Popular Code Answers by Language