strfold - fold string by case

SYNOPSIS

<strfold $str [$mode]>


DESCRIPTION
The strfold function folds each of its $str string values, according to the corresponding $mode value. Typical usage is to fold a string to all-lower-case, or remove accents. The strfold function 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, in the same format as the stringcomparemode setting of apicp (here). The default if empty or unspecified is the current apicp stringcomparemode setting.


DIAGNOSTICS
strfold returns its $str argument with all values folded according to the corresponding stringcomparemode $mode value.


EXAMPLE

<strfmt "%hV" "Gro&#xDF;e"> <!-- German es-zett in UTF-8 -->
<strfold $ret "+igncase">   <!-- fold mode: default+ignorecase -->

The return value in $ret would be "grosse".


CAVEATS
The strfold function was added in version 5.01.1206664000 20080327.


SEE ALSO
strfoldcmp, upper, lower


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