Entering content frame

Background documentation strnCmp Function Locate the document in its SAP Library structure

Purpose

Compares the first n characters of two strings for equality (case-sensitive).

Syntax

int strnCmp (in string string1,
in string string2,
in int numberOfChars)

Parameters

string1

Expression evaluating to a string.

string2

Expression evaluating to a string.

numberOfChars

Number of characters to compare.

Return Value

The return value depends on the value of numberOfChars :

Condition

Return Value

If the first numberOfChars characters of string1 are equal to the first numberOfChars characters of string2 .

0

If the first numberOfChars characters of string1 are less than the first numberOfChars characters of string2 .

<0

If the first numberOfChars characters of string2 are less than the first numberOfChars characters of string1 .

>0

Example

`if (strnCmp(toLower(~language), "en", 1) == 0)`
English Version:
`end`

Leaving content frame