In case of an error, the return value is nullptr and
stringSize will be set to -1 (if
stringSize is not nullptr).
If the stack item is not a string, the return value is nullptr and
stringSize will be set to 0 (if
stringSize is not nullptr).
If the stack item is a string, the return value is not nullptr, and
stringSize will be the size of the string buffer (if
stringSize is not nullptr). In that case, the user is in charge of releasing the returned buffer with
simReleaseBuffer.