Overview
/
KCL Standard Library
/
Functions
/
string::isEqual

string::isEqualFunction in std::string

Compare two strings for equality.

By default, this performs an exact, case-sensitive comparison equivalent to the == operator. Set caseInsensitive to true to compare using locale-independent full Unicode case folding.

Full case folding may expand characters; for example, Straße and STRASSE compare as equal. The exact mappings follow the Unicode data bundled with KCL.

Unicode normalization is not performed. Canonically equivalent strings with different representations therefore compare as unequal. Empty strings are valid inputs, and comparison is symmetric.

This function always returns a Boolean predicate, including inside a sketch block. It does not create an equivalence constraint.

Arguments

NameTypeDescriptionRequired
textstringThe string to compare.Yes
tostringThe string to compare text with.Yes
caseInsensitiveboolWhether to compare using locale-independent full Unicode case folding.No

Returns

bool - A boolean value.

Examples