Mask a string with a specified character
maskString('1234567890', 6) // '******7890' Copy
maskString('1234567890', 6) // '******7890'
maskString('1234567890', 6, 'x') // 'xxxxxx7890' Copy
maskString('1234567890', 6, 'x') // 'xxxxxx7890'
maskString('12345', 6) // '*****' Copy
maskString('12345', 6) // '*****'
The string to mask
The length of the string to mask
The character to use for masking. Default is '*'
The masked string
Mask a string with a specified character
Example
Example
Example