obfuscate

fun String.obfuscate(freq: Int = 2): String

Obfuscates this String by replacing characters at every freq-th position with '*'.

Return

the obfuscated string

Parameters

freq

the replacement frequency (default every 2nd character, starting at index 0)