Data update

This commit is contained in:
Ingy döt Net 2025-02-27 18:35:13 -05:00
parent 8e4e15fa56
commit 72eb4943cb
1853 changed files with 35514 additions and 9441 deletions

View file

@ -0,0 +1,12 @@
def auto_abbreviate (string)
words = string.split
return nil unless words.present?
(1..words.max_of(&.size)).each do |n|
return n if words.map(&.[0, n]).to_set.size == words.size
end
""
end
File.read_lines("weekdays.txt").each_with_index do |line, i|
puts "#{i+1}) #{auto_abbreviate(line)} #{line}"
end