Skip to content

Instantly share code, notes, and snippets.

@kelso
Created May 29, 2009 14:28
Show Gist options
  • Save kelso/119974 to your computer and use it in GitHub Desktop.
Save kelso/119974 to your computer and use it in GitHub Desktop.
def fancy(str)
str = str.gsub(/[ ]+/," ")
str = str.gsub(/ /,"-")
str = str.downcase
str = str.mb_chars.normalize(:kd).gsub(/[^\-x00-\x7F]/n, '').to_s
return str
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment