Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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') returns-> 'H*********d'
mask('Hello World',2,1,' ') ->  He**o Wo**d
mask('1234-5678-9012-3456',4,4,'','-')   ->  1234-****-****-3456

...