base.StringBuffer.equalsIgnoreCase

Compare strings (case insensitive)

Syntax

equalsIgnoreCase(
   str STRING )
  RETURNS BOOLEAN
  1. str 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

MAIN
   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
END MAIN

Output:

buf matches There ignoring case