This function compares two strings. Returns true if the strings are equal, if not it returns false. The function is not case sensitive, which means comparing strings like "AbC" and "aBC" will return true.$string.equalsIgnoreCase(<stringA>, <stringB>)
stringAstringB
Example 90 #set($strA='Hello World!')
#set($strB='hello world!')
Equal?: $string.equalsIgnoreCase($strA, $strB)
Original string: $strA
New string: $strBEqual?: true
Original string: Hello World!
New string: hello world!
Example 91 #set($strA='Hello World!')
#set($strB='Hello girls!')
Equal?: $string.equalsIgnoreCase($strA, $strB)
Original string: $strA
New string: $strBEqual?: false
Original string: Hello World!
New string: Hello girls!
Example 92 #set($str='Hello World!')
#set($check=$string.equalsIgnoreCase($str, 'Hello world!'))
#if($check)
$str
#else
No match!
#endHello World!
Example 93 #set($str='Hello World!')
#set($check=$string.equalsIgnoreCase($str, 'Hello girls!'))
#if($check)
$str
#else
No match!
#endNo match!
| OpenText StreamServe 5.6.2 | Updated: 2018-01-26 |