Do we have a string function in RUBY to delete 1st 3 characters
or last 3 character or 3 characters in middle from the string.
user = aaaPrasadxxxPrasadxxx
from above string “user” I want to delete 1st characters “aaa”
In the same way I want to delete last 3 characters “xxx” and , need
to delete middle 3 characters “xxx”
to delete last 3 character & 1st 3 characters, i have used code as
user = user.chop.chop.chop user = user.reverse.chop.chop.chop.reverse
Other than this do we have any other string function in ruby?
could you please help in this issue.