Skip to content

Latest commit

 

History

History
63 lines (41 loc) · 1.02 KB

add.md

File metadata and controls

63 lines (41 loc) · 1.02 KB

add

Concatenate two strings together.

API

Numeric.string.add(left, right)

Joins matching entries of two string inputs.

  • Parameters:
    • left: First string or array of strings
    • right: Second string or array of strings
  • Returns: Concatenated strings matching the input shape
  • NumPy: Covers np.strings.add, np.char.add through a single Numerix method.

Examples

Concatenate two strings

import Numeric from '@neabyte/numerix'

const value = Numeric.string.add('a', 'b')

console.log(value)
// ab

Concatenate arrays of strings

import Numeric from '@neabyte/numerix'

const values = Numeric.string.add(['a', 'b'], ['c', 'd'])

console.log(values)
// ["ac","bd"]

Concatenate a string with an empty string

import Numeric from '@neabyte/numerix'

const value = Numeric.string.add('ab', '')

console.log(value)
// ab

Concatenate two empty strings

import Numeric from '@neabyte/numerix'

const value = Numeric.string.add('', '')

console.log(value)
//