Use cstring_to_text_with_len when length is known.

This avoids a potentially-expensive extra call to strlen().

David Rowley