base.StringBuffer.equalsIgnoreCase

Compare strings (case insensitive)

Syntax

equalsIgnoreCase(
   reference STRING )
  RETURNING result BOOLEAN
  1. reference is the string to compare with.

Usage

The equalsIgnoreCase() method compares the current string buffer with the passed string, ignoring the character case.

Since the parameter for the method must be a string, you can use the toString() method to convert a base.StringBuffer object in order to compare it.

The method returns TRUE if the strings are identical, otherwise it returns FALSE.

Example

DEFINE buf3 base.StringBuffer 
LET buf3 = base.StringBuffer.create()
CALL buf3.append("there")
IF buf3.equalsIgnoreCase("There") THEN
   DISPLAY "buf matches There ignoring case"
END IF

Output:

buf matches There ignoring case