Insert a separator between every character of a string.
Numeric.string.join(separator, text)Inserts a separator between every character.
- Parameters:
separator: Separator placed between characterstext: String or array of strings to join
- Returns: Joined strings matching the input shape
- NumPy: Equivalent to
np.char.join.
import Numeric from '@neabyte/numerix'
const value = Numeric.string.join('-', 'abc')
console.log(value)
// a-b-cimport Numeric from '@neabyte/numerix'
const value = Numeric.string.join('', 'abc')
console.log(value)
// abcimport Numeric from '@neabyte/numerix'
const values = Numeric.string.join('-', ['ab', 'cd'])
console.log(values)
// ["a-b","c-d"]import Numeric from '@neabyte/numerix'
const value = Numeric.string.join('-', 'a')
console.log(value)
// a