MCPcopy Create free account
hub / github.com/defold/defold / EscapeDnsText

Function EscapeDnsText

engine/dlib/src/test/test_mdns.cpp:335–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333 }
334
335 static void EscapeDnsText(const char* value, char* out, uint32_t out_size)
336 {
337 if (out_size == 0)
338 return;
339
340 uint32_t out_len = 0;
341 while (*value && out_len + 1 < out_size)
342 {
343 const char c = *value++;
344 if (c == '.' || c == '\\')
345 {
346 if (out_len + 2 >= out_size)
347 break;
348 out[out_len++] = '\\';
349 }
350 out[out_len++] = c;
351 }
352 out[out_len] = 0;
353 }
354
355 static void BuildFullServiceName(const char* instance_name, const char* service_type_local, char* out, uint32_t out_size)
356 {

Callers 1

BuildFullServiceNameFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected