string->compare

Compares sort order between strings.

Target member

Signature

1string->compare(find::string, -case::boolean= ?)

Compares sort order between strings.

string->compare is called with member syntax on a receiver value. string->compare works with text values. Normalize input at boundaries, escape at output boundaries, and keep encoding calls close to the place where the encoded text is needed.

Parameters

find
Required value of type string. Supply find positionally unless the signature shows a keyword form.
-case
Optional value of type boolean. Supply -case by keyword, keeping the leading hyphen in the call.

Examples

Basic call

1'abc'->compare('abd')
The example shows the receiver and result shape. In templates, apply escaping at the final output boundary.