lsamen

Tests two character strings for equality regardless of the case.

Syntax

FORTRAN:

val = lsamen( n, ca, cb )

C:

val = lsamen( n, ca, cb );

Include Files

Input Parameters

Name

Type

Description

n

FORTRAN: INTEGER

C: const int*

FORTRAN: The number of characters in ca and cb to be compared.

C: Pointer to the number of characters in ca and cb to be compared.

ca, cb

FORTRAN: CHARACTER*(*)

C: const char*

Specify two character strings of length at least n to be compared. Only the first n characters of each string will be accessed.

Output Parameters

Name

Type

Description

val

FORTRAN: LOGICAL

C: int

FORTRAN: Result of the comparison. .TRUE. if ca and cb are equivalent except for the case, and .FALSE. otherwise. The function also returns .FALSE. if len(ca) or len(cb) is less than n.

C: Result of the comparison. Non-zero if ca and cb are equivalent except for the case, and zero otherwise.

Description

This logical function tests if the first n letters of one string are the same as the first n letters of another string, regardless of the case.


Submit feedback on this help topic