2 ms·
A long time ago my solution was ptr+len but I allocated 1 more byte so that if a string had to be given to libc, I could terminate it at that time. No need for
by t43562 4y ago
A long time ago my solution was ptr+len but I allocated 1 more byte so that if a string had to be given to libc, I could terminate it at that time. No need for a copy then.
- wvenable 4y agoBASIC strings in Windows -- you store the length in the 4 bytes before the pointer to the string and put a null terminator at the end. https://learn.microsoft.com/en-us/previous-versions/windows/desktop/automat/bstr https://learn.microsoft.com/en-us/previous-versions/windows/...