Sha256: 38ca57b940dd318622f720c19670e116f01ee97f84f7696cc67629a4598e52dc
Contents?: true
Size: 400 Bytes
Versions: 24
Compression:
Stored size: 400 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 end
Version data entries
24 entries across 24 versions & 2 rubygems