@ycmjason/

PromotedInnocentErrors

Ruby

No description

fork
loading
Files
  • main.rb
main.rb
1
2
3
4
5
6
def remove_emoji_and_hyphenate(string)
  string.downcase.strip.gsub(/[[:punct:]]/u, "").gsub(/\s+/, "-")
end

a = 'multiword heading with ( weird ? punctu&^ation'
remove_emoji_and_hyphenate(a)
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]