Lines Matching refs:size_t

62 static zend_string *php_bin2hex(const unsigned char *old, const size_t oldlen)  in php_bin2hex()
65 size_t i, j; in php_bin2hex()
80 static zend_string *php_hex2bin(const unsigned char *old, const size_t oldlen) in php_hex2bin()
82 size_t target_length = oldlen >> 1; in php_hex2bin()
85 size_t i, j; in php_hex2bin()
224 size_t remain_len = ZSTR_LEN(s11); in php_spn_common_handler()
230 } else if ((size_t) start > remain_len) { in php_spn_common_handler()
241 } else if ((size_t) len > remain_len) { in php_spn_common_handler()
657 static inline zend_result php_charmask(const unsigned char *input, size_t len, char *mask) in php_charmask()
706 static zend_always_inline zend_string *php_trim_int(zend_string *str, const char *what, size_t what… in php_trim_int()
798 PHPAPI zend_string *php_trim(zend_string *str, const char *what, size_t what_len, int mode) in php_trim()
848 size_t newtextlen, chk, breakchar_len = 1; in PHP_FUNCTION()
849 size_t alloced; in PHP_FUNCTION()
902 chk = (size_t)(ZSTR_LEN(text)/linelength + 1); in PHP_FUNCTION()
917 alloced += (size_t) (((ZSTR_LEN(text) - current + 1)/linelength + 1) * breakchar_len) + 1; in PHP_FUNCTION()
919 chk = (size_t) ((ZSTR_LEN(text) - current)/linelength) + 1; in PHP_FUNCTION()
1033 size_t allocated = EXPLODE_ALLOC_STEP, found = 0; in php_explode_negative_limit()
1109 size_t len = 0; in php_implode()
1231 size_t skipped = 0; in PHP_FUNCTION()
1306 PHPAPI char *php_strtoupper(char *s, size_t len) in php_strtoupper()
1334 PHPAPI char *php_strtolower(char *s, size_t len) in php_strtolower()
1381 PHPAPI zend_string *php_basename(const char *s, size_t len, const char *suffix, size_t suffix_len)
1487 if (suffix != NULL && suffix_len < (size_t)(basename_end - basename_start) &&
1500 size_t string_len, suffix_len = 0;
1514 PHPAPI size_t php_dirname(char *path, size_t len)
1524 size_t str_len;
1567 size_t path_len;
1647 PHPAPI char *php_stristr(char *s, char *t, size_t s_len, size_t t_len)
1654 PHPAPI size_t php_strspn(const char *s1, const char *s2, const char *s1_end, const char *s2_end)
1671 PHPAPI size_t php_strcspn(const char *s1, const char *s2, const char *s1_end, const char *s2_end)
1694 size_t found_offset;
1813 if (offset < 0 || (size_t)offset > ZSTR_LEN(haystack)) {
1846 if (offset < 0 || (size_t)offset > ZSTR_LEN(haystack)) {
1877 if ((size_t)offset > ZSTR_LEN(haystack)) {
1881 p = ZSTR_VAL(haystack) + (size_t)offset;
1884 if (offset < -ZEND_LONG_MAX || (size_t)(-offset) > ZSTR_LEN(haystack)) {
1890 if ((size_t)-offset < ZSTR_LEN(needle)) {
1927 if ((size_t)offset > ZSTR_LEN(haystack)) {
1931 p = ZSTR_VAL(haystack) + (size_t)offset;
1935 if (offset < -ZEND_LONG_MAX || (size_t)(-offset) > ZSTR_LEN(haystack)) {
1939 e = ZSTR_VAL(haystack) + (ZSTR_LEN(haystack) + (size_t)offset);
1953 if ((size_t)offset > ZSTR_LEN(haystack)) {
1961 if (offset < -ZEND_LONG_MAX || (size_t)(-offset) > ZSTR_LEN(haystack)) {
1968 if ((size_t)-offset < ZSTR_LEN(needle)) {
2010 …tic zend_string *php_chunk_split(const char *src, size_t srclen, const char *end, size_t endlen, s…
2014 size_t chunks;
2015 size_t restlen;
2055 size_t endlen = 2;
2071 if ((size_t)chunklen > ZSTR_LEN(str)) {
2084 result = php_chunk_split(ZSTR_VAL(str), ZSTR_LEN(str), end, endlen, (size_t)chunklen);
2108 if (-(size_t)f > ZSTR_LEN(str)) {
2113 } else if ((size_t)f > ZSTR_LEN(str)) {
2122 if (-(size_t)l > ZSTR_LEN(str) - (size_t)f) {
2127 } else if ((size_t)l > ZSTR_LEN(str) - (size_t)f) {
2194 } else if ((size_t)f > ZSTR_LEN(str)) {
2207 if ((size_t)l > ZSTR_LEN(str) || (l < 0 && (size_t)(-l) > ZSTR_LEN(str))) {
2254 size_t result_len;
2358 if (((size_t) f + l) > ZSTR_LEN(orig_str)) {
2576 size_t delims_len = 6;
2604 PHPAPI char *php_strtr(char *str, size_t len, const char *str_from, const char *str_to, size_t trle…
2606 size_t i;
2625 xlat[(size_t)(unsigned char) str_from[i]] = str_to[i] - str_from[i];
2629 str[i] += xlat[(size_t)(unsigned char) str[i]];
2638 static zend_string *php_strtr_ex(zend_string *str, const char *str_from, const char *str_to, size_t
2641 size_t i;
2650 size_t len = ZSTR_LEN(str);
2710 xlat[(size_t)(unsigned char) str_from[i]] = str_to[i] - str_from[i];
2714 if (xlat[(size_t)(unsigned char) ZSTR_VAL(str)[i]]) {
2718 ZSTR_VAL(new_str)[i] = ZSTR_VAL(str)[i] + xlat[(size_t)(unsigned char) ZSTR_VAL(str)[i]];
2735 size_t slen = ZSTR_LEN(input);
2738 size_t len, pos, old_pos;
2740 size_t minlen = 128*1024;
2741 size_t maxlen = 0;
2917 static zend_string* php_char_to_str_ex(zend_string *str, char from, char *to, size_t to_len, bool c…
2920 size_t char_count;
2988 const char *needle, size_t needle_len, const char *str, size_t str_len, zend_long *replace_count)
3012 size_t count = 0;
3061 zend_string *needle, const char *str, size_t str_len, zend_long *replace_count)
3088 size_t count = 0;
3154 …*php_str_to_str(const char *haystack, size_t length, const char *needle, size_t needle_len, const …
3174 size_t count = 0;
3231 size_t to_len = 0;
3374 …_similar_str(const char *txt1, size_t len1, const char *txt2, size_t len2, size_t *pos1, size_t *p…
3379 size_t l;
3398 static size_t php_similar_char(const char *txt1, size_t len1, const char *txt2, size_t len2)
3400 size_t sum;
3401 size_t pos1 = 0, pos2 = 0, max, count;
3425 size_t sim;
3524 size_t nlen = ZSTR_LEN(str), i;
3583 PHPAPI zend_string *php_addcslashes_str(const char *str, size_t len, const char *what, size_t wleng…
3589 size_t newlen;
3625 PHPAPI zend_string *php_addcslashes(zend_string *str, const char *what, size_t wlength)
3712 size_t offset;
3888 size_t offset;
3985 static zend_always_inline char *php_stripslashes_impl(const char *str, char *out, size_t len)
4053 size_t l = ZSTR_LEN(str);
4133 size_t replace_len = 0;
4367 size_t block_start, block_end, block_type, i;
4369 size_t begin, end, orig_begin;
4370 size_t str_len;
4479 size_t new_char_count=char_count, new_begin=begin;
4530 size_t repl_cnt = 0;
4566 size_t repl_len = is_xhtml ? (sizeof("<br />") - 1) : (sizeof("<br>") - 1);
4613 size_t allowed_tags_len=0;
4690 size_t len = strlen(retval);
4772 size_t arglen;
4800 static bool php_tag_find(char *tag, size_t len, const char *set) {
4857 PHPAPI size_t php_strip_tags(char *rbuf, size_t len, const char *allow, size_t allow_len) /* {{{ */
4883 PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, const char *allow, size_t allow_len, bool a…
4889 size_t pos;
5202 return (size_t)(rp - rbuf);
5213 size_t delim_len = 0, enc_len = 0, esc_len = 0;
5243 size_t result_len; /* Length of the resulting string */
5298 size_t retlen=0;
5299 size_t tmp = 0;
5393 size_t len, i;
5450 size_t haystack_len, needle_len;
5472 if ((offset < 0) || ((size_t)offset > haystack_len)) {
5484 if (length < 0 || ((size_t)length > haystack_len)) {
5515 size_t num_pad_chars; /* Number of padding characters (total - input size) */
5517 size_t pad_str_len = 1;
5519 size_t i, left_pad=0, right_pad=0;
5532 if (pad_length < 0 || (size_t)pad_length <= ZSTR_LEN(input)) {
5591 size_t str_len, format_len;
5781 size_t char_list_len = 0, word_count = 0;
5861 size_t n_reg_segments;
5874 if ((size_t)split_length >= ZSTR_LEN(str)) {
5935 size_t cmp_len;
5960 if ((size_t)offset > ZSTR_LEN(s1)) {
5965 cmp_len = len ? (size_t)len : MAX(ZSTR_LEN(s2), (ZSTR_LEN(s1) - offset));
5976 static zend_string *php_utf8_encode(const char *s, size_t len)
5978 size_t pos = len;
6006 static zend_string *php_utf8_decode(const char *s, size_t len)
6008 size_t pos = 0;
6016 c = php_next_utf8_char((const unsigned char*)s, (size_t) len, &pos, &status);
6040 size_t arg_len;
6054 size_t arg_len;