Liking cljdoc? Tell your friends :D

lambdaisland.uri.normalize


char-seqclj/s

(char-seq str)
(char-seq str offset)

Return a seq of the characters in a string, making sure not to split up UCS-2 (or is it UTF-16?) surrogate pairs. Because JavaScript. And Java.

Return a seq of the characters in a string, making sure not to split up
UCS-2 (or is it UTF-16?) surrogate pairs. Because JavaScript. And Java.
sourceraw docstring

character-classesclj/s

Which characters should be percent-encoded depends on which section of the URI is being normalized. This map contains regexes that for each case match the characters that need encoding.

Which characters should be percent-encoded depends on which section
of the URI is being normalized. This map contains regexes that for each
case match the characters that need encoding.
sourceraw docstring

hex-code-point?clj/s

(hex-code-point? cp)
source

high-surrogate?clj/s

(high-surrogate? char-code)
source

normalizeclj/s

(normalize uri)

Normalize a lambdaisland.uri.URI. Currently normalizes (percent-encodes) the path, query, and fragment.

Normalize a lambdaisland.uri.URI. Currently normalizes (percent-encodes) the
path, query, and fragment.
sourceraw docstring

normalize-fragmentclj/s

(normalize-fragment fragment)
source

normalize-pathclj/s

(normalize-path path)
source

normalize-queryclj/s

(normalize-query s)

Normalize the query section of a URI

  • sub-delimiters that are not percent encoded are left unencoded
  • sub-delimiters and other reserved characters are always percent encoded
  • non-reserved characters that are percent-encoded are decoded
Normalize the query section of a URI

- sub-delimiters that are not percent encoded are left unencoded
- sub-delimiters and other reserved characters are always percent encoded
- non-reserved characters that are percent-encoded are decoded
sourceraw docstring

percent-decodeclj/s

(percent-decode s)

The inverse of percent-encode, convert any %XX sequences in a string to characters. Byte sequences are interpreted as UTF-8. To use a different encoding. re-bind *character-encoding*

The inverse of `percent-encode`, convert any %XX sequences in a string to
characters. Byte sequences are interpreted as UTF-8. To use a different
encoding. re-bind `*character-encoding*`
sourceraw docstring

percent-encodeclj/s

(percent-encode component)
(percent-encode component type)

Convert characters in their percent encoded form. e.g. (percent_encode "a") #_=> "%61". When given a second argument, then only characters of the given character class are encoded, see character-class.

Characters are encoded as UTF-8. To use a different encoding. re-bind *character-encoding*

Convert characters in their percent encoded form. e.g.
`(percent_encode "a") #_=> "%61"`. When given a second argument, then
only characters of the given character class are encoded,
see `character-class`.

Characters are encoded as UTF-8. To use a different encoding. re-bind
`*character-encoding*`
sourceraw docstring

sub-delimsclj/s

RFC3986 section 2.2

The purpose of reserved characters is to provide a set of delimiting characters that are distinguishable from other data within a URI. URIs that differ in the replacement of a reserved character with its corresponding percent-encoded octet are not equivalent. Percent- encoding a reserved character, or decoding a percent-encoded octet that corresponds to a reserved character, will change how the URI is interpreted by most applications. Thus, characters in the reserved set are protected from normalization and are therefore safe to be used by scheme-specific and producer-specific algorithms for delimiting data subcomponents within a URI.

RFC3986 section 2.2

The purpose of reserved characters is to provide a set of delimiting
characters that are distinguishable from other data within a URI.
URIs that differ in the replacement of a reserved character with its
corresponding percent-encoded octet are not equivalent.  Percent-
encoding a reserved character, or decoding a percent-encoded octet
that corresponds to a reserved character, will change how the URI is
interpreted by most applications.  Thus, characters in the reserved
set are protected from normalization and are therefore safe to be
used by scheme-specific and producer-specific algorithms for
delimiting data subcomponents within a URI. 
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close