mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
1.1 KiB
1.1 KiB
Function equalText
Check equality of two strings. Comparison is case sensitive.
For matrices, the function is evaluated element wise.
Syntax
math.equalText(x, y)
Parameters
| Parameter | Type | Description |
|---|---|---|
x |
string | Array | DenseMatrix | First string to compare |
y |
string | Array | DenseMatrix | Second string to compare |
Returns
| Type | Description |
|---|---|
| number | Array | DenseMatrix | Returns true if the values are equal, and false if not. |
Examples
math.equalText('Hello', 'Hello'); // returns true
math.equalText('a', 'A'); // returns false
math.equal('2e3', '2000'); // returns true
math.equalText('2e3', '2000'); // returns false
math.equalText('B', ['A', 'B', 'C']); // returns [false, true, false]