Use text_len instead of null terminated c strings