Ruby/String/Strip from Left

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск

Strip from left in place

fear = "             F                  "
fear.lstrip!



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

fear = "             F           "
puts fear.lstrip