<p></p>
<p>Clarifying further for the devs dealing first time with <code>str</code> structure: the functions working with them do not change the content of the input value, it sets (shifts) the start pointer <code>str.s</code> and adjusts the length <code>str.len</code>.</p>
<p>Also, in many cases the str.s does not point to a zero-terminated string value of length str.len, that's why printing it in logs must be done with <code>%.*s</code> which requires first to provide the lenght. There are acases when str.s points to a zero-terminated string, but the developer has to track the origin of the value and be sure it is zero-terminated.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2569#issuecomment-737090928">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZIUUX2CMXHZEW5HSC3SSX62TANCNFSM4UHW5LHQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZMMCZI6NB5HIQA3EY3SSX62TA5CNFSM4UHW5LH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFPXR24A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2569#issuecomment-737090928",
"url": "https://github.com/kamailio/kamailio/issues/2569#issuecomment-737090928",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>