>> extern text *cstring_to_text_with_len(const char *s, int len);
buffer_to_text ???
RegardsPavel Stehule