String Handling - URLEncode

1 post / 0 new
Last post
Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:
String Handling - URLEncode

URLEncode changes strings so that they are safe for including in URLs. For instance, a space character is encoded to %20. This is a % symbol indicating an encoded character, followed by the ASCII value of the character in hex.
This version encodes all values into upper-case, maintaining Twitter compatibility.

String encoded = URLencode("Encode this string please&£$");

AttachmentSize
URLEncode.zip1.4 KB