ASL
|
This is a helper class to use a String as an output parameter of a C function using a pointer to a buffer.
At the function return the underlying String will recompute its length. Works with functions using 8-bit characters or wide characters.
Use it like this. For example, to get the current directory:
That will expand the internal space of name
to 200 characters, then call that Unicode Win32 function, then convert the resulting data back to UTF-8, and the internal length will be set to the real string length.
#include <String.h>