def equal(
first: _StringLike,
second: _StringLike,
/,
*,
capabilities: Capability | None = None,
) -> bool This function can be called as a method on a String object or as a standalone function.
Args:
first (String or str or bytes): The first string object.
second (String or str or bytes): The second string object.
capabilities (Capability, optional): Capabilities to run, defaulting to the CPU's enabled ones.
Returns:
bool: True if the strings are equal, False otherwise.
Note:
Comparison is byte-level: a str and a bytes with identical bytes compare equal.
Raises:
TypeError: If the argument is not string-like or incorrect number of arguments is provided.
Examples
>>> sz.equal('abc', 'abc')
True