Any particular reason you want to take a `var cstring` argument instead of
simply returning a string? Your powerbuilder code looks like it creates a
string `ls_out`, then allocates space for it, then passes the pointer to that
to Nim, which promptly rewrites the pointer to the new string, and then you
output the old string (which is just 100 bytes of probably uninitialized
memory). That being said I've never used powerbuilder so I might be way off.
But the fact that the C version works fine I'm pretty sure it's your
powerbuilder code which is the problem here.