RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AnsiStrings.SameStr Function

Compare two strings with case-sensitivity.

Pascal
function SameStr(const S1: AnsiString; const S2: AnsiString): Boolean; overload;
function SameStr(const S1: AnsiString; const S2: AnsiString; LocaleOptions: TLocaleOptions): Boolean; overload;
C++
Boolean SameStr(const AnsiString S1, const AnsiString S2);
Boolean SameStr(const AnsiString S1, const AnsiString S2, TLocaleOptions LocaleOptions);

SameStr compares S1 to S2 with case-sensitivity. Returns true if S1 and S2 are equal, that is, if CompareStr would return 0; otherwise it returns false. Use AnsiSameStr for a comparison using the current user locale. 

Use SameText to compare strings without case-sensitivity. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!