Compare two strings with the requested operator.
Numeric.string.equal(left, right, mode = 'equal')Compares matching entries using the requested operator.
- Parameters:
left: First string or array of stringsright: Second string or array of stringsmode: Comparison operator applied to each pair
- Returns: Comparison results matching the input shape
- NumPy: Covers
np.strings.equal,np.strings.not_equal,np.char.equal,np.char.not_equal,np.char.compare_chararraysthrough a single Numerix method.
import Numeric from '@neabyte/numerix'
const flag = Numeric.string.equal('a', 'a')
console.log(flag)
// trueimport Numeric from '@neabyte/numerix'
const flag = Numeric.string.equal('a', 'b')
console.log(flag)
// falseimport Numeric from '@neabyte/numerix'
const flag = Numeric.string.equal('a', 'b', 'greater')
console.log(flag)
// falseimport Numeric from '@neabyte/numerix'
const flags = Numeric.string.equal(['a', 'b'], ['a', 'c'])
console.log(flags)
// [true,false]