use regex to check number of padding spaces

This commit is contained in:
Dave Machado
2017-07-28 12:32:39 -04:00
parent 10bc3049c1
commit 3a79096bdb
2 changed files with 7 additions and 3 deletions

3
build/test.rb Normal file
View File

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