1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.createEqualText = void 0;
|
7 |
|
8 | var _factory = require("../../utils/factory");
|
9 |
|
10 | var name = 'equalText';
|
11 | var dependencies = ['typed', 'compareText', 'isZero'];
|
12 | var createEqualText = /* #__PURE__ */(0, _factory.factory)(name, dependencies, function (_ref) {
|
13 | var typed = _ref.typed,
|
14 | compareText = _ref.compareText,
|
15 | isZero = _ref.isZero;
|
16 |
|
17 | /**
|
18 | * Check equality of two strings. Comparison is case sensitive.
|
19 | *
|
20 | * For matrices, the function is evaluated element wise.
|
21 | *
|
22 | * Syntax:
|
23 | *
|
24 | * math.equalText(x, y)
|
25 | *
|
26 | * Examples:
|
27 | *
|
28 | * math.equalText('Hello', 'Hello') // returns true
|
29 | * math.equalText('a', 'A') // returns false
|
30 | * math.equal('2e3', '2000') // returns true
|
31 | * math.equalText('2e3', '2000') // returns false
|
32 | *
|
33 | * math.equalText('B', ['A', 'B', 'C']) // returns [false, true, false]
|
34 | *
|
35 | * See also:
|
36 | *
|
37 | * equal, compareText, compare, compareNatural
|
38 | *
|
39 | * @param {string | Array | DenseMatrix} x First string to compare
|
40 | * @param {string | Array | DenseMatrix} y Second string to compare
|
41 | * @return {number | Array | DenseMatrix} Returns true if the values are equal, and false if not.
|
42 | */
|
43 | return typed(name, {
|
44 | 'any, any': function anyAny(x, y) {
|
45 | return isZero(compareText(x, y));
|
46 | }
|
47 | });
|
48 | });
|
49 | exports.createEqualText = createEqualText; |
\ | No newline at end of file |