16 #define BYTES_FACTOR 1 / 8 * 9
17 #define BYTES_CHUNK 32
18 #define BYTES_ALIGN(len) PN_ALIGN(len + sizeof(struct PNBytes), BYTES_CHUNK) - sizeof(struct PNBytes)
28 unsigned k =
kh_get(str,
t, str);
36 size_t len = strlen(str);
65 int len = strlen(str);
66 int len2 = strlen(str2);
70 s->chars[len+len2] =
'\0';
85 va_start(args, format);
86 len = (
PN_SIZE)vsnprintf(NULL, 0, format, args);
90 va_start(args, format);
91 vsnprintf(
s->chars, len + 1, format, args);
113 int i = 0, dec = 0, sign = 0, len =
PN_STR_LEN(
self);
116 sign = (str[0] ==
'-' ? -1 : 1);
117 if (str[0] ==
'-' || str[0] ==
'+') {
120 for (i = 0; i < len; i++)
121 if (str[i] <
'0' || str[i] >
'9')
123 if (i < 10 && i == len) {
145 for (i = 0; s[i]; i++)
146 if ((s[i] & 0xC0) != 0x80)
156 corrected = nilvalue;
162 }
else if (i > len) {
185 return potion_str2(P, str + startoffset, endoffset - startoffset);
235 s->chars[
len] =
'\0';
252 va_start(args, format);
253 len = (
PN_SIZE)vsnprintf(NULL, 0, format, args);
256 if (
s->len + len + 1 >
s->siz) {
262 va_start(args, format);
263 vsnprintf(
s->chars +
s->len, len + 1, format, args);
283 if (
s->len + len + 1 >
s->siz) {
291 s->chars[
s->len] =
'\0';
349 if (index >=
PN_STR_LEN(
self) || (
signed long)index < 0)