string.equals

This function checks whether two strings are equal.

Syntax

string.equals(str1, str2)

Arguments

Argument

Type

Description

str1, str2

string

Strings to be compared

Returns

Type

Description

boolean

True: if the strings are equal

False: if the strings are not equal

Examples

The function string.equals("Hello","Hello2") returns false.