mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
reformatting: cJSONUtils_PointerEncodedstrlen
This commit is contained in:
parent
2f002879c0
commit
3f6716e63a
@ -61,7 +61,19 @@ static int cJSONUtils_Pstrcasecmp(const char *a, const char *e)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cJSONUtils_PointerEncodedstrlen(const char *s) {int l=0;for (;*s;s++,l++) if (*s=='~' || *s=='/') l++;return l;}
|
static int cJSONUtils_PointerEncodedstrlen(const char *s)
|
||||||
|
{
|
||||||
|
int l = 0;
|
||||||
|
for (; *s; s++, l++)
|
||||||
|
{
|
||||||
|
if ((*s == '~') || (*s == '/'))
|
||||||
|
{
|
||||||
|
l++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
|
||||||
static void cJSONUtils_PointerEncodedstrcpy(char *d,const char *s)
|
static void cJSONUtils_PointerEncodedstrcpy(char *d,const char *s)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user