CurryInfo: url-base-0.1.0 / Network.URL.string2urlencoded

definition: Info
 
string2urlencoded :: String -> String
string2urlencoded [] = []
string2urlencoded (c:cs)
  | noEncode c = c : string2urlencoded cs
  | c == ' '   = '+' : string2urlencoded cs
  | otherwise
  = let oc = ord c
    in '%' : int2hex(oc `div` 16) : int2hex(oc `mod` 16) : string2urlencoded cs
 where
  noEncode x = isAlphaNum x || x `elem` "-"

  int2hex i = if i<10 then chr (ord '0' + i)
                      else chr (ord 'A' + i - 10)
demand: Info
 argument 1
deterministic: Info
 deterministic operation
documentation: Info
 
Translates strings into equivalent URL encoded strings.
See also <http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1>.
failfree: Info
 _
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {({[]}) |-> {[]} || ({:}) |-> {:}}
name: Info
 string2urlencoded
precedence: Info
 no precedence defined
result-values: Info
 {:,[]}
signature: Info
 String -> String
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term