StrEqual()

Syntax

Result_Flag as L = StrEqual( String1 as C, String2 as C [, Ignore_White_Space as L [, Case_Sensitive as L ]] )

Argument

Description

Result_Flag

.T. = The strings match (are equal).

.F. = The strings do not match.

String1

A character string.

String2

A character string.

Ignore_White_Space

Optional. Default = .F. .

  • .T. = Ignore white space characters when making the comparison

  • .F. = Do not ignore white space characters

Case_Sensitive

Optional. Default = .F. .

  • .T. = Ignore character case when making the comparison

  • .F. = Do not ignore character case

Description

The StrEqual() function compares the values contained in two character strings and returns .T. if they are equal, based on the selection of options.

Supported By

Alpha Five Version 8 and Above

Limitations

Desktop applications only.

Example

dim string1 as C

dim string2 as C

string1 = "Abc "

string2 = "abc"

? strequal(string1, string2)

= .F.

? strequal(string1, string2, .T.)

= .F.

? strequal(string1, string2, .F., .T.)

= .F.

? strequal(string1, string2, .T., .T.)

= .T.

See Also

Character Comparison Functions