...
The managed string library also provides a mechanism for dealing with data sanitization by (optionally) checking that all characters in a string belong to a predefined set of "safe" characters.
Compliant Solution 1
This compliant solution The following code illustrates how the managed string library can be used to create a managed string and retrieve a null-terminated byte string from the managed string.
...