use regex to check number of padding spaces

This commit is contained in:
Dave Machado committed 2017-07-28 12:32:39 -04:00
1 parent 10bc3049c1
commit 3a79096bdb
2 files changed
+7 -3

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
s = " lol "
puts s[/\A +/].size
puts s[/ +\z/].size