equals function

bool equals(
  1. String str,
  2. String comparison
)

Checks if two strings are exactly equal.

Performs a direct string comparison between str and comparison. This comparison is case-sensitive.

Returns true if the strings are identical, otherwise returns false.

Example:

equals('hello', 'hello'); // true
equals('Hello', 'hello'); // false (case-sensitive)
equals('hello', 'world'); // false

Implementation

bool equals(String str, String comparison) => _equals(str, comparison);