C functions that return c strings

BlitzMax Forums/BlitzMax Beginners Area/C functions that return c strings

Is there any elegant way of converting a c char* to a bmx String on the fly?

For example,
C:
char buffer[100];

char* getBuffer(void) {
    return buffer;
}


BMX:
Extern
    Function getBuffer:String()
End Extern


Obviously you can't do that. How would I go about getting something that acted like a "Function getBuffer:String()" from that C code?