RFE: Intern C-FFI compatible strings
I have a project for which I will eventually (probably) want to provide C bindings. It would be enormously convenient if there was a variant of (or feature flag for) the string interner backend which left an extra null-termination byte at the end of every interned string, such that the str_from_interner.as_ptr() could be used from C without first copying the whole string to a new CString.
Is this possible, or am I missing some details which might make this unsafe to do?
That's a decent request and it may make sense to adjust the string_interner crate in order to support this use case.
It is more a question about a proper API design for this issue.
Is there a specific API that you'd like to see as a string_interner user?