locale compare

This block is part of the value group and was last modified in core v10.4.28.

locale compare v10.4.28

In pins 3
  • value A required
    value
  • value B required
    value
  • locale required
    value
Out pins 1
  • sort
    number

Outputs -1, 0, or 1 comparing value_0 against value_1 using Unicode locale-aware collation (JS localeCompare semantics), NOT plain byte order. value_2 selects the locale; an empty or unparseable locale falls back to the default collator. Unwired string inputs default to "-".

A typical wiring for locale compare: the number out pin feeds cast to value.

Studio canvas example for the locale compare block: typical wiring for locale compare.

Version history

Introduced in v10.4.28.


Back to value Return to the main group to view all sub-groups Back to value Return to the group to view all blocks within this group