package b0

  1. Overview
  2. Docs
Software construction and deployment kit

Install

dune-project
 Dependency

Authors

Maintainers

Sources

b0-0.0.6.tbz
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0

doc/b0.std/B0_url/Percent/index.html

Module B0_url.PercentSource

Percent-encoding codecs according to RFC 3986.

Note. This should not be used for URL query strings and application/x-www-form-urlencoded which is slightly different (welcome to the Web). The Webs.Http.Query module handles that.

Sourcetype kind = [
  1. | `Uri_component
    (*

    Percent-encodes anything but unreserved and sub-delims URI characters. In other words only 'a'..'z', 'A'..'Z', '0'..'9', '-', '.', '_', '~' and '!', '$', '&', '\'', '(', ')' '*', '+', ',', ';', '=' are not percent-encoded.

    *)
  2. | `Uri
    (*

    Percent-encodes like `Uri_component except it also preserves gen-delims URI characters. In other words in addition to those characters above, ':', '/', '?', '#', '[', ']', '@' are not percent-encoded.

    *)
]

The kind of percent encoding.

Sourceval encode : kind -> string -> string

encode kind s is the percent encoding of s according to kind.

Sourceval decode : string -> string

decode s is the percent decoding of s.