11 lines
409 B
Text
11 lines
409 B
Text
|
|
include "NSLog.incl"
|
||
|
|
|
||
|
|
local fn PercentEncodeURLString( urlStr as CFStringRef ) as CFStringRef
|
||
|
|
CFStringRef encodedStr = fn StringByAddingPercentEncodingWithAllowedCharacters( urlStr, fn CharacterSetAlphanumericSet )
|
||
|
|
end fn = encodedStr
|
||
|
|
|
||
|
|
NSLog( @"%@", fn PercentEncodeURLString( @"http://foo bar/" ) )
|
||
|
|
NSLog( @"%@", fn PercentEncodeURLString( @"http://www.rosettacode.org/wiki/URL_encoding" ) )
|
||
|
|
|
||
|
|
HandleEvents
|