Sha256: 0d8213a71b8291212a33fcecce0a6bc6b05962baac6657ac8f1a3f7d7afa1517

Contents?: true

Size: 138 Bytes

Versions: 7

Compression:

Stored size: 138 Bytes

Contents

class String
  def remove_invalid_chars
    self.gsub(/[^\w\s]/, "")
  end
  
  def only_whitespace?
    !!(self =~ /\A[\s]+\Z/)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
features-0.3.0 lib/string_extension.rb
features-0.2.1 lib/string_extension.rb
features-0.2.0 lib/string_extension.rb
features-0.1.4 lib/string_extension.rb
features-0.1.3 lib/string_extension.rb
features-0.1.2 lib/string_extension.rb
features-0.1.0 lib/string_extension.rb