Strip from left in place : Strip from Left « String « Ruby






Strip from left in place


fear = "             F                  "
fear.lstrip! 

 

Related examples in the same category

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