Module: AnbtSql::StringUtil
Instance Method Summary collapse
Instance Method Details
#char_at(str, n) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/anbt-sql-formatter/helper.rb', line 29 def char_at(str, n) if n < 0 || str.size - 1 < n raise IndexOutOfBoundsException end str.slice(n, 1) end |
#equals_ignore_case(str_a, str_b) ⇒ Object
37 38 39 |
# File 'lib/anbt-sql-formatter/helper.rb', line 37 def equals_ignore_case(str_a, str_b) str_a.casecmp(str_b) == 0 end |