본문 바로가기

Ruby & Rails

[Ruby] reverse string

s="1234"
reverse_s = s.reverse
s.reverse!
view raw r.rb hosted with ❤ by GitHub