Skip to main content

blankout

Change every non-whitespace character to the given char. Used in the templatize function.

def blankout(
src: string,
char: string
) - > string

Change every non-whitespace character to the given char. Used in the templatize function.

Parameters

NameTypeDescription
srcstringThe source string containing the text to be masked
charstringThe replacement character used to mask each non-whitespace character in the source string

Returns

TypeDescription
stringThe modified string where all non-whitespace characters have been replaced by the specified character