MCPcopy Create free account
hub / github.com/apache/qpid-proton / pn_string_setn

Function pn_string_setn

c/src/core/object/string.c:173–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173int pn_string_setn(pn_string_t *string, const char *bytes, size_t n)
174{
175 int err = pn_string_grow(string, n);
176 if (err) return err;
177
178 if (bytes) {
179 memcpy(string->bytes, bytes, n*sizeof(char));
180 string->bytes[n] = '\0';
181 string->size = n;
182 } else {
183 string->size = PNI_NULL_SIZE;
184 }
185
186 return 0;
187}
188
189ssize_t pn_string_put(pn_string_t *string, char *dst)
190{

Callers 11

pn_do_mechanismsFunction · 0.85
pn_condition_setFunction · 0.85
pn_string_set_bytesFunction · 0.85
pn_message_decodeFunction · 0.85
pn_stringnFunction · 0.85
pn_string_setFunction · 0.85
pn_string_copyFunction · 0.85
pn_inspectFunction · 0.85
test_stringFunction · 0.85
object_test.cppFile · 0.85

Calls 1

pn_string_growFunction · 0.85

Tested by 1

test_stringFunction · 0.68