strfoldcmp - compare strings folded by case

SYNOPSIS

<strfoldcmp $a $b [$mode]>


DESCRIPTION
The strfoldcmp function compares each string value of $a with the corresponding value of $b, returning less than zero if $a is less than $b, zero if the values are equal, or greater than zero if $a is greater than $b. The strings are compared according to the corresponding $mode value. The strfoldcmp function is more powerful than - though no necessarily compatible with - the strcmp and strcmpi functions, as it it supports UTF-8 and all locale-independent Unicode 5.1.0 case-foldable characters.

The $mode argument is a comma-separated list of a mode and flags, with the same format and aliases as for strfold.


DIAGNOSTICS
strfoldcmp returns an integer corresponding to the sort order of $a and $b according to stringcomparemode $mode.


EXAMPLE

<strfoldcmp "alpha" "Bravo" "unicodemono,ignorecase">

The return value in $ret would be -1.


CAVEATS
The strfoldcmp function was added in version 5.01.1206664000 20080327.


SEE ALSO
strfold, upper, lower


Copyright © Thunderstone Software     Last updated: Oct 24 2023
Copyright © 2024 Thunderstone Software LLC. All rights reserved.