wipe

inline fun StringBuilder.wipe(): StringBuilder(source)

Wipes the StringBuilder backing array from index 0 to StringBuilder.length (exclusive) with the null character \u0000, and then sets it's length back to 0. If StringBuilder.length is 0, then StringBuilder.capacity will be used.

On Kotlin/Js there is no backing array, so after setting length to 0 will return early.

Return

StringBuilder


fun StringBuilder.wipe(len: Int): StringBuilder(source)

Wipes the StringBuilder backing array from index 0 to len (exclusive) with the null character \u0000, and then sets it's length back to 0. If len is less than 1 or greater than StringBuilder.capacity, then StringBuilder.capacity is used in place of len.

On Kotlin/Js there is no backing array, so after setting length to 0 will return early.

Return

StringBuilder

Parameters

len

The length (exclusive), starting from index 0, to wipe. If less than 1 or greater than StringBuilder.capacity, then StringBuilder.capacity is used instead.