Test whether a string ends with a suffix.
Numeric.string.suffix(input, closer, begin, finish)Checks the end of each string entry.
- Parameters:
input: String or array of strings to testcloser: Suffix expected at the endbegin: Optional starting offset within each stringfinish: Optional ending offset within each string
- Returns: Match results matching the input shape
- NumPy: Covers
np.strings.endswith,np.char.endswiththrough a single Numerix method.
import Numeric from '@neabyte/numerix'
const flag = Numeric.string.suffix('hello', 'lo')
console.log(flag)
// trueimport Numeric from '@neabyte/numerix'
const flag = Numeric.string.suffix('hello', 'he')
console.log(flag)
// falseimport Numeric from '@neabyte/numerix'
const flag = Numeric.string.suffix('hello', '')
console.log(flag)
// trueimport Numeric from '@neabyte/numerix'
const flags = Numeric.string.suffix(['hello', 'world'], 'lo')
console.log(flags)
// [true,false]