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