Created
April 24, 2009 05:56
-
-
Save nog/100981 to your computer and use it in GitHub Desktop.
phpのurlencodeっぽいのをrubyで
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def phpurlencode str | |
URI.encode(str, /[^a-zA-Z\d\-\_\.]/n) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment