Sha256: ec961c98a8d0aca99339acca237ecbf3ce5a96915eac63659c42407993fa245b
Contents?: true
Size: 347 Bytes
Versions: 4
Compression:
Stored size: 347 Bytes
Contents
require "pp" lines = File.readlines('word.txt') p max_n = lines.size (0..max_n-1).each { |n| line = lines[n].chomp judge = line.include?(" ") if judge == true line = line.gsub!(/ {1,10}/,"_") end lines[n] = line + "\n" } File.open('word.txt','w') do |file| lines.each do |line| file.print(line) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
yuris_vocabuil-0.2.3 | lib/old/trans_word.rb |
yuris_vocabuil-0.2.2 | lib/old/trans_word.rb |
yuris_vocabuil-0.2.1 | lib/old/trans_word.rb |
yuris_vocabuil-0.2.0 | lib/old/trans_word.rb |