Sha256: e4d5dbf36bda5c5d7cfe69eef46947e6a93ff5a32ef4b71e70715b02967ccad9
Contents?: true
Size: 446 Bytes
Versions: 12
Compression:
Stored size: 446 Bytes
Contents
module Tomlrb class StringUtils def self.multiline_replacements(str) strip_spaces(str).gsub(/\\\n\s+/, '') end def self.replace_escaped_chars(str) str .gsub(/\\n/, "\n") .gsub(/\\0/, "\0") .gsub(/\\t/, "\t") .gsub(/\\r/, "\r") .gsub(/\\\"/, '"') .gsub(/\\\\/, '\\') end def self.strip_spaces(str) str[0] = '' if str[0] == "\n" str end end end
Version data entries
12 entries across 12 versions & 1 rubygems