@skybloxsystems/ticket-bot
Version:
49 lines (31 loc) • 1.2 kB
Markdown
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
Compare two strings lexically. Comparison is case sensitive.
Returns 1 when x > y, -1 when x < y, and 0 when x == y.
For matrices, the function is evaluated element wise.
```js
math.compareText(x, y)
```
Parameter | Type | Description
--------- | ---- | -----------
`x` | string &
`y` | string &
Type | Description
---- | -----------
number &
```js
math.compareText('B', 'A') // returns 1
math.compareText('2', '10') // returns 1
math.compare('2', '10') // returns -1
math.compareNatural('2', '10') // returns -1
math.compareText('B', ['A', 'B', 'C']) // returns [1, 0, -1]
```
[](equal.md),
[](equalText.md),
[](compare.md),
[](compareNatural.md)