Skip to content

@technobuddha > library > String > Operations

Function: mask()

ts
function mask(
   input: string, 
   simpleMask: string, 
   options: MaskOptions): string;

Defined in: mask.ts:28

Use a simple mask to display a string

Parameters

ParameterTypeDescription
inputstringThe string
simpleMaskstringThe mask
optionsMaskOptionssee MaskOptions

Returns

string

The mask filled with characters from the string

Remarks

The simple mask is a string where '#' characters are replaced by characters from the input string. Other characters in the mask are output as-is, to output a '#' use '#'

Default Value

ts
missing space