Skip to content

Instantly share code, notes, and snippets.

@qxjit
Created January 20, 2011 01:43
Show Gist options
  • Save qxjit/787254 to your computer and use it in GitHub Desktop.
Save qxjit/787254 to your computer and use it in GitHub Desktop.
qxjit's Golfed solution for sanitize
def sanitize(w,s)s.tr('/*-._\\','').sub(/#{w}/i,'*'*w.size)end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment