Overview
Returns the masked value of the given value.
Arguments
string val
Value to be masked. Required.
number start
Start character position to mask. If not specified, 1 is used.
number end
End character position to mask. If not specified, 1 is used.
string separator
Separator to split value as multiple words.
string ignore
Characters to ignore when masking.
Return Value
Masked value
Remarks
Examples
Code Block |
---|
mask('Hello Word') -> 'H*********d'
mask('Hello World',2,1,' ') -> He**o Wo**d
mask('1234-5678-9012-3456',4,4,'','-') -> 1234-****-****-3456 |