Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-20

Not-null-terminated string support

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 0.2
    • 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, ...)

      Attachments

        Activity

          People

            kbanker Kyle Banker
            viraptor Stanis?aw Pitucha
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: