Unit 'utility' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#amunits]

Strnicmp

Length-limited case-insensitive string compare.

Declaration

Source position: utility.pas line 373

function Strnicmp(

  const Str1: PChar;

  const Str2: PChar;

  len: LongInt

):LongInt;

function Strnicmp(

  const string1: string;

  const string2: pCHAR;

  length: LongInt

):LongInt;

function Strnicmp(

  const string1: pCHAR;

  const string2: string;

  length: LongInt

):LongInt;

function Strnicmp(

  const string1: string;

  const string2: string;

  length: LongInt

):LongInt;

Arguments

Str1

  

String to compare

Str2

  

String to compare

Function result

Relationship between string1 and string2 <0 means string1 < string2 =0 means string1 = string2 >0 means string1 > string2

Description

This function compares two strings, ignoring case using a generic case conversion routine. If the strings have different lengths, the shorter is treated as if it were extended with zeros. This function never compares more than 'length' characters.

Whenever locale.library is installed in a system, this function is replaced by language-specific code. This means that depending on which language the user has currently selected, identical pairs of strings may return different values when passed to this function. This fact must be taken into consideration when using this function.

See also

Stricmp

  

Case-insensitive string comparison.


Documentation generated on: 2021-07-30