Conformance Examples 0.1.0 — Transforms: transform-size¶
size-list¶
Returns the number of elements in a list.
Template
Context
Output
size-empty-list¶
The size of an empty list is zero.
Template
Context
Output
size-string¶
Liquid-compatible: the character count of a string.
Template
Context
Output
size-struct-is-null¶
A struct input is neither list nor string, so the result is null.
Template
Context
Output
size-number-is-null¶
A non-string primitive (number) is neither list nor string, so the result is null.
Template
Context
Output
size-astral-string-counts-code-points¶
A surrogate-pair (astral) character counts as one code point, not two UTF-16 units.
Template
Context
Output
size-lone-surrogate-counts-as-one¶
An unpaired (lone) surrogate counts as a single code-point-sized unit, not zero and not an error.
Template
Context
Output
Source fixture: transforms/transform-size.json