Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
Description
I'd like to propose a new set of functions that can deal with not null terminated strings. It would really help in situations where names are part of a longer string. (just like there are strcpy and strncpy)
For example for:
bson_buffer * bson_append_string( bson_buffer * b , const char * name , const char * str );
there could be:
bson_buffer * bson_append_string_n( bson_buffer * b , const char * name , const char * str , unsigned len );
Same idea affects other types (symbol, code, regex, ...)