wip
Alpha Chen 9 years ago
parent bc8539d361
commit 2b53c1a438

@ -27,10 +27,14 @@ class String
escaped.sub(/"$/, "")
end
def encoded
"\"#{self.gsub(/(\\|")/, '\\\\\1')}\""
end
end
num = DATA.read.each_line.map(&:chomp).inject(0) do |n,line|
n + line.size - line.escaped.size
n + line.encoded.size - line.size
end
puts num
__END__

Loading…
Cancel
Save