Siebel eScript Language Reference > Siebel eScript Commands > Clib Object String Methods >

Clib.strncmpi() Method and Clib.strnicmp() Method


These methods make a case-insensitive comparison between two strings, up to a specified number of bytes.

Syntax

Clib.strncmpi(string1, string2, maxLen)
Clib.strncmpi(string1, string2, maxLen)

Parameter
Description

string1

A string, or a variable containing a string, to be compared with string2

string2

A string, or a variable containing a string, to be compared with string1

maxLen

The number of bytes to compare

Returns

The result of the comparison, which is 0 if the strings are identical, a negative number if the ASCII code of the first unmatched character in string1 is less than that of the first unmatched character in string2, or a positive number if the ASCII code of the first unmatched character in string1 is greater than that of the first unmatched character in string2.

Usage

This method compares up to maxLen bytes of string1 against string2 until there is a mismatch or it reaches the end of a string. This method does a case-insensitive comparison, so that A and a are considered to be the same. The comparison ends when maxLen bytes have been compared or when an end of string has been reached, whichever comes first.

See Also

Clib.stricmp() Method and Clib.strcmpi() Method
Clib.strncmp() Method

Siebel eScript Language Reference Copyright © 2007, Oracle. All rights reserved.