Platforms to show: All Mac Windows Linux Cross-Platform

ClearStringContentMBS(s as String) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method String MBS Util Plugin 19.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Clears string content.
Example
// this is a constant string
Var c As String = "Hello"

// this is an allocated string
Var a As String = c + "World"

// try to clear both
Call ClearStringContentMBS c
Call ClearStringContentMBS a

MsgBox "const: "+c+" "+Str(Len(c))+EndOfLine+"allocated: "+a+" "+Str(Len(a))

Overwrites content of string with zeros.
We check if this is a constant string and for those do nothing.
Returns true if we zeroed content, otherwise false.

This function can help to clear memory for passwords stored in strings.

Blog Entries

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...