Home | History | Annotate | Download | only in libxml2

Lines Matching defs:self

1274   trio_string_t *self;
1276 self = (trio_string_t *)TRIO_MALLOC(sizeof(trio_string_t));
1277 if (self)
1279 self->content = NULL;
1280 self->length = 0;
1281 self->allocated = 0;
1283 return self;
1295 TRIO_ARGS2((self, delta),
1296 trio_string_t *self,
1304 ? ( (self->allocated == 0) ? 1 : self->allocated * 2 )
1305 : self->allocated + delta;
1307 new_content = (char *)TRIO_REALLOC(self->content, new_size);
1310 self->content = new_content;
1311 self->allocated = new_size;
1328 TRIO_ARGS2((self, length),
1329 trio_string_t *self,
1333 return (self->allocated < length)
1334 ? TrioStringGrow(self, length - self->allocated)
1352 trio_string_t *self;
1354 self = TrioStringAlloc();
1355 if (self)
1357 if (TrioStringGrow(self,
1360 self->content[0] = (char)0;
1361 self->allocated = initial_size;
1365 trio_string_destroy(self);
1366 self = NULL;
1369 return self;
1377 @param self Dynamic string
1381 TRIO_ARGS1((self),
1382 trio_string_t *self)
1384 assert(self);
1386 if (self)
1388 trio_destroy(self->content);
1389 TRIO_FREE(self);
1398 @param self Dynamic string.
1411 TRIO_ARGS2((self, offset),
1412 trio_string_t *self,
1417 assert(self);
1419 if (self->content != NULL)
1421 if (self->length == 0)
1423 (void)trio_string_length(self);
1427 if (offset > (int)self->length)
1429 offset = self->length;
1434 offset += self->length + 1;
1440 result = &(self->content[offset]);
1450 @param self Dynamic String
1458 TRIO_ARGS1((self),
1459 trio_string_t *self)
1463 assert(self);
1465 result = self->content;
1467 self->content = NULL;
1468 self->length = self->allocated = 0;
1477 @param self Dynamic String
1489 TRIO_ARGS2((self, buffer),
1490 trio_string_t *self,
1493 assert(self);
1495 trio_destroy(self->content);
1496 self->content = trio_duplicate(buffer);
1506 TRIO_ARGS1((self),
1507 trio_string_t *self)
1509 assert(self);
1511 return self->allocated;
1520 TRIO_ARGS1((self),
1521 trio_string_t *self)
1523 trio_xstring_append_char(self, 0);
1531 @param self Dynamic string to be modified.
1537 TRIO_ARGS2((self, other),
1538 trio_string_t *self,
1543 assert(self);
1546 length = self->length + other->length;
1547 if (!TrioStringGrowTo(self, length))
1549 trio_copy(&self->content[self->length], other->content);
1550 self->length = length;
1565 TRIO_ARGS2((self, other),
1566 trio_string_t *self,
1571 assert(self);
1574 length = self->length + trio_length(other);
1575 if (!TrioStringGrowTo(self, length))
1577 trio_copy(&self->content[self->length], other);
1578 self->length = length;
1592 TRIO_ARGS2((self, character),
1593 trio_string_t *self,
1596 assert(self);
1598 if ((int)self->length >= trio_string_size(self))
1600 if (!TrioStringGrow(self, 0))
1603 self->content[self->length] = character;
1604 self->length++;
1616 @param self Dynamic string to be modified.
1622 TRIO_ARGS2((self, other),
1623 trio_string_t *self,
1626 assert(self);
1629 return trio_contains(self->content, other->content);
1640 TRIO_ARGS2((self, other),
1641 trio_string_t *self,
1644 assert(self);
1647 return trio_contains(self->content, other);
1658 TRIO_ARGS2((self, other),
1659 trio_string_t *self,
1662 assert(self);
1665 self->length = 0;
1666 return trio_string_append(self, other);
1677 TRIO_ARGS2((self, other),
1678 trio_string_t *self,
1681 assert(self);
1684 self->length = 0;
1685 return trio_xstring_append(self, other);
1699 trio_string_t *self;
1703 self = TrioStringAlloc();
1704 if (self)
1706 self->content = TrioDuplicateMax(other->content, other->length);
1707 if (self->content)
1709 self->length = other->length;
1710 self->allocated = self->length + 1;
1714 self->length = self->allocated = 0;
1717 return self;
1730 trio_string_t *self;
1734 self = TrioStringAlloc();
1735 if (self)
1737 self->content = TrioDuplicateMax(other, trio_length(other));
1738 if (self->content)
1740 self->length = trio_length(self->content);
1741 self->allocated = self->length + 1;
1745 self->length = self->allocated = 0;
1748 return self;
1758 TRIO_ARGS2((self, other),
1759 trio_string_t *self,
1762 assert(self);
1765 return trio_equal(self->content, other->content);
1776 TRIO_ARGS2((self, other),
1777 trio_string_t *self,
1780 assert(self);
1783 return trio_equal(self->content, other);
1794 TRIO_ARGS3((self, max, other),
1795 trio_string_t *self,
1799 assert(self);
1802 return trio_equal_max(self->content, max, other->content);
1813 TRIO_ARGS3((self, max, other),
1814 trio_string_t *self,
1818 assert(self);
1821 return trio_equal_max(self->content, max, other);
1832 TRIO_ARGS2((self, other),
1833 trio_string_t *self,
1836 assert(self);
1839 return trio_equal_case(self->content, other->content);
1850 TRIO_ARGS2((self, other),
1851 trio_string_t *self,
1854 assert(self);
1857 return trio_equal_case(self->content, other);
1868 TRIO_ARGS3((self, max, other),
1869 trio_string_t *self,
1873 assert(self);
1876 return trio_equal_case_max(self->content, max, other->content);
1887 TRIO_ARGS3((self, max, other),
1888 trio_string_t *self,
1892 assert(self);
1895 return trio_equal_case_max(self->content, max, other);
1906 TRIO_ARGS4((self, max, format, datetime),
1907 trio_string_t *self,
1912 assert(self);
1914 return trio_format_date_max(self->content, max, format, datetime);
1925 TRIO_ARGS2((self, character),
1926 trio_string_t *self,
1929 assert(self);
1931 return trio_index(self->content, character);
1942 TRIO_ARGS2((self, character),
1943 trio_string_t *self,
1946 assert(self);
1948 return trio_index_last(self->content, character);
1959 TRIO_ARGS1((self),
1960 trio_string_t *self)
1962 assert(self);
1964 if (self->length == 0)
1966 self->length = trio_length(self->content);
1968 return self->length;
1979 TRIO_ARGS1((self),
1980 trio_string_t *self)
1982 assert(self);
1984 return trio_lower(self->content);
1995 TRIO_ARGS2((self, other),
1996 trio_string_t *self,
1999 assert(self);
2002 return trio_match(self->content, other->content);
2013 TRIO_ARGS2((self, other),
2014 trio_string_t *self,
2017 assert(self);
2020 return trio_match(self->content, other);
2031 TRIO_ARGS2((self, other),
2032 trio_string_t *self,
2035 assert(self);
2038 return trio_match_case(self->content, other->content);
2049 TRIO_ARGS2((self, other),
2050 trio_string_t *self,
2053 assert(self);
2056 return trio_match_case(self->content, other);
2067 TRIO_ARGS2((self, other),
2068 trio_string_t *self,
2071 assert(self);
2074 return trio_substring(self->content, other->content);
2085 TRIO_ARGS2((self, other),
2086 trio_string_t *self,
2089 assert(self);
2092 return trio_substring(self->content, other);
2103 TRIO_ARGS1((self),
2104 trio_string_t *self)
2106 assert(self);
2108 return trio_upper(self->content);