Invert the case of every letter in a string.
Numeric.string.swapcase(text)Inverts uppercase and lowercase letters.
- Parameters:
text: String or array of strings to convert
- Returns: Case-swapped strings matching the input shape
- NumPy: Covers
np.strings.swapcase,np.char.swapcasethrough a single Numerix method.
import Numeric from '@neabyte/numerix'
const value = Numeric.string.swapcase('HeLLo')
console.log(value)
// hEllOimport Numeric from '@neabyte/numerix'
const values = Numeric.string.swapcase(['Ab', 'Cd'])
console.log(values)
// ["aB","cD"]import Numeric from '@neabyte/numerix'
const value = Numeric.string.swapcase('abc')
console.log(value)
// ABCimport Numeric from '@neabyte/numerix'
const value = Numeric.string.swapcase('123')
console.log(value)
// 123