Sha256: c974e5a0dd9ef877f0be1c88c2275622f48fc1987aedc81a119661881cd1b51c
Contents?: true
Size: 519 Bytes
Versions: 90
Compression:
Stored size: 519 Bytes
Contents
# encoding: utf-8 class String #:nodoc: def to_crlf gsub(/\n|\r\n|\r/) { "\r\n" } end def to_lf gsub(/\n|\r\n|\r/) { "\n" } end unless method_defined?(:ascii_only?) # Provides all strings with the Ruby 1.9 method of .ascii_only? and # returns true or false US_ASCII_REGEXP = %Q{\x00-\x7f} def ascii_only? !(self =~ /[^#{US_ASCII_REGEXP}]/) end end def not_ascii_only? !ascii_only? end unless method_defined?(:bytesize) alias :bytesize :length end end
Version data entries
90 entries across 60 versions & 4 rubygems