Report whether the left string sorts before the right.
Numeric.string.less(left, right, inclusive = false)Reports whether the left string sorts before the right.
- Parameters:
left: First string or array of stringsright: Second string or array of stringsinclusive: When true treats equal strings as matching
- Returns: Comparison results matching the input shape
- NumPy: Covers
np.strings.less,np.strings.less_equal,np.char.less,np.char.less_equalthrough a single Numerix method.
import Numeric from '@neabyte/numerix'
const flag = Numeric.string.less('a', 'b')
console.log(flag)
// trueimport Numeric from '@neabyte/numerix'
const flag = Numeric.string.less('b', 'a')
console.log(flag)
// falseimport Numeric from '@neabyte/numerix'
const flag = Numeric.string.less('a', 'a', true)
console.log(flag)
// trueimport Numeric from '@neabyte/numerix'
const flags = Numeric.string.less(['a', 'b'], ['b', 'a'])
console.log(flags)
// [true,false]