Liking cljdoc? Tell your friends :D

psosf.text

Text operations that must give the same result on every platform.

The JVM and JavaScript compare strings by UTF-16 code unit, but .NET's default string comparison follows the current culture, which orders case differently and can ignore hyphens. Everything that sorts or compares strings for output (canonical JSON key order, the signature digest list, timestamps) goes through compare-strings, so every platform produces the same bytes. Numbers are formatted without culture for the same reason.

Text operations that must give the same result on every platform.

The JVM and JavaScript compare strings by UTF-16 code unit, but .NET's
default string comparison follows the current culture, which orders case
differently and can ignore hyphens. Everything that sorts or compares
strings for output (canonical JSON key order, the signature digest list,
timestamps) goes through compare-strings, so every platform produces the
same bytes. Numbers are formatted without culture for the same reason.
raw docstring

code-unitclj/s

(code-unit s i)

The UTF-16 code unit at index i of s, as an integer.

The UTF-16 code unit at index i of s, as an integer.
sourceraw docstring

compare-stringsclj/s

(compare-strings a b)

Compares two strings by UTF-16 code unit, on every platform.

Compares two strings by UTF-16 code unit, on every platform.
sourceraw docstring

hexclj/s

(hex n)

A non-negative integer in uppercase hexadecimal.

A non-negative integer in uppercase hexadecimal.
sourceraw docstring

number->stringclj/s

(number->string x)

A number as JSON writes it, independent of culture.

A number as JSON writes it, independent of culture.
sourceraw docstring

sort-stringsclj/s

(sort-strings xs)

Strings sorted by UTF-16 code unit, on every platform.

Strings sorted by UTF-16 code unit, on every platform.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close