Indy 9 | Content | Index | Reference

AnsiSameText
Unit: IdGlobal
Performs a case-insensitive comparison of two Ansi strings.

    function AnsiSameText(const S1: string; const S2: string): Boolean;

Unit
IdGlobal
Parameters
const S1: string
The first string used in the comparison.
const S2: string
The second string used in the comparison.
Return Value
Boolean - True when the strings are the same.
Description
AnsiSameText is a Boolean function used to perform a case-insensitive comparison of two strings using the locale for the current user on the local computer system.

AnsiSameText returns True if the strings are equal in lexical value, or False when the strings do not share the same collation order value.

AnsiSameText encapsulates the platform-specific procedures and functions used to perform string comparisons. On the Windows platform, the WIN32 API function used is CompareString.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.