Use lstrip, rstrip, and strip (lstrip!, rstrip!, and strip!). : Strip from Left « String « Ruby






Use lstrip, rstrip, and strip (lstrip!, rstrip!, and strip!).



fear = "             F           "

puts fear.lstrip 

 

Related examples in the same category

1.Strip from left in place