1 |
|
2 |
|
3 | # Function equalText
|
4 |
|
5 | Check equality of two strings. Comparison is case sensitive.
|
6 |
|
7 | For matrices, the function is evaluated element wise.
|
8 |
|
9 |
|
10 | ## Syntax
|
11 |
|
12 | ```js
|
13 | math.equalText(x, y)
|
14 | ```
|
15 |
|
16 | ### Parameters
|
17 |
|
18 | Parameter | Type | Description
|
19 | --------- | ---- | -----------
|
20 | `x` | string | Array | DenseMatrix | First string to compare
|
21 | `y` | string | Array | DenseMatrix | Second string to compare
|
22 |
|
23 | ### Returns
|
24 |
|
25 | Type | Description
|
26 | ---- | -----------
|
27 | number | Array | DenseMatrix | Returns true if the values are equal, and false if not.
|
28 |
|
29 |
|
30 | ## Examples
|
31 |
|
32 | ```js
|
33 | math.equalText('Hello', 'Hello') // returns true
|
34 | math.equalText('a', 'A') // returns false
|
35 | math.equal('2e3', '2000') // returns true
|
36 | math.equalText('2e3', '2000') // returns false
|
37 |
|
38 | math.equalText('B', ['A', 'B', 'C']) // returns [false, true, false]
|
39 | ```
|
40 |
|
41 |
|
42 | ## See also
|
43 |
|
44 | [equal](equal.md),
|
45 | [compareText](compareText.md),
|
46 | [compare](compare.md),
|
47 | [compareNatural](compareNatural.md)
|