Lines Matching refs:out_len

1614 …size_t out_len = MBSTRG(current_internal_encoding)->to_wchar(&in, &in_len, wchar_buf, 128, &MBSTRG…  in PHP_FUNCTION()  local
1615 ZEND_ASSERT(out_len <= 128); in PHP_FUNCTION()
1616 encoding->from_wchar(wchar_buf, out_len, &buf, !in_len && last_feed); in PHP_FUNCTION()
1696 size_t out_len = enc->to_wchar(&p, &in_len, wchar_buf, 128, &state); in PHP_FUNCTION() local
1697 ZEND_ASSERT(out_len <= 128); in PHP_FUNCTION()
1702 if (out_len >= split_len - char_count) { in PHP_FUNCTION()
1712 enc->from_wchar(wchar_buf, out_len, &buf, !in_len); in PHP_FUNCTION()
1713 char_count += out_len; in PHP_FUNCTION()
1718 while (i < out_len) { in PHP_FUNCTION()
1722 if (out_len - i >= split_len) { in PHP_FUNCTION()
1729 enc->from_wchar(wchar_buf + i, out_len - i, &buf, !in_len); in PHP_FUNCTION()
1730 char_count = out_len - i; in PHP_FUNCTION()
2095 size_t out_len = enc->to_wchar(&in, &in_len, wchar_buf, 128, &state); in mb_get_substr_slow() local
2096 ZEND_ASSERT(out_len <= 128); in mb_get_substr_slow()
2098 if (from >= out_len) { in mb_get_substr_slow()
2099 from -= out_len; in mb_get_substr_slow()
2101 size_t needed_codepoints = MIN(out_len - from, len); in mb_get_substr_slow()
2102 enc->from_wchar(wchar_buf + from, needed_codepoints, &buf, !in_len || out_len >= len); in mb_get_substr_slow()
2453 size_t out_len = enc->to_wchar(&in, &in_len, wchar_buf, 128, &state); in mb_get_strwidth() local
2454 ZEND_ASSERT(out_len <= 128); in mb_get_strwidth()
2456 while (out_len) { in mb_get_strwidth()
2460 width += character_width(wchar_buf[--out_len]); in mb_get_strwidth()
2494 size_t out_len = 0; in mb_trim_string() local
2499 out_len = enc->to_wchar(&in, &in_len, wchar_buf, 128, &state); in mb_trim_string()
2500 ZEND_ASSERT(out_len <= 128); in mb_trim_string()
2502 if (out_len <= to_skip) { in mb_trim_string()
2503 to_skip -= out_len; in mb_trim_string()
2505 for (int i = to_skip; i < out_len; i++) { in mb_trim_string()
2558 out_len = enc->to_wchar(&in, &in_len, wchar_buf, 128, &state); in mb_trim_string()
2559 ZEND_ASSERT(out_len <= 128); in mb_trim_string()
2562 if (out_len <= from) { in mb_trim_string()
2563 from -= out_len; in mb_trim_string()
2565 for (int i = from; i < out_len; i++) { in mb_trim_string()
2573 enc->from_wchar(wchar_buf + from, out_len - from, &buf, false); in mb_trim_string()
3054 …size_t out_len = enc->to_wchar((unsigned char**)&array[i].in, &array[i].in_len, wchar_buf, 128, &a… in count_demerits() local
3055 ZEND_ASSERT(out_len <= 128); in count_demerits()
3058 while (out_len) { in count_demerits()
3059 uint32_t w = wchar_buf[--out_len]; in count_demerits()
3279 …size_t out_len = encoding->to_wchar(&in, &in_len, wchar_buf + buf_offset, 64 - buf_offset, &state); in jp_kana_convert() local
3280 out_len += buf_offset; in jp_kana_convert()
3281 ZEND_ASSERT(out_len <= 64); in jp_kana_convert()
3283 if (!out_len) { in jp_kana_convert()
3287 for (int i = 0; i < out_len-1; i++) { in jp_kana_convert()
3296 if (i == out_len-1) { in jp_kana_convert()
3308 *converted++ = mb_convert_kana_codepoint(wchar_buf[out_len-1], 0, NULL, &second, mode); in jp_kana_convert()
3314 wchar_buf[0] = wchar_buf[out_len-1]; in jp_kana_convert()
3694 size_t out_len = encoding->to_wchar(&in, &in_len, wchar_buf, 32, &state); in html_numeric_entity_encode() local
3695 ZEND_ASSERT(out_len <= 32); in html_numeric_entity_encode()
3700 for (int i = 0; i < out_len; i++) { in html_numeric_entity_encode()
3830 …size_t out_len = encoding->to_wchar(&in, &in_len, wchar_buf + wchar_buf_offset, 127 - wchar_buf_of… in html_numeric_entity_decode() local
3831 out_len += wchar_buf_offset; in html_numeric_entity_decode()
3832 ZEND_ASSERT(out_len <= 127); in html_numeric_entity_decode()
3833 wchar_buf[out_len] = '&'; /* Sentinel, to avoid bounds checks */ in html_numeric_entity_decode()
3843 if (p == wchar_buf + out_len) { in html_numeric_entity_decode()
3845 encoding->from_wchar(wchar_buf, out_len, &buf, !in_len); in html_numeric_entity_decode()
3868 if ((p2 == wchar_buf + out_len) && in_len && (p2 - p) <= HEX_ENTITY_MAXLEN) { in html_numeric_entity_decode()
3906 if ((p2 == wchar_buf + out_len) && in_len && (p2 - p) <= DEC_ENTITY_MAXLEN) { in html_numeric_entity_decode()
3940 } else if ((p2 == wchar_buf + out_len) && in_len) { in html_numeric_entity_decode()
3962 if (p < wchar_buf + out_len) in html_numeric_entity_decode()
4590 size_t out_len = encoding->to_wchar(&in, &length, wchar_buf, 8, &state); in php_mb_check_encoding() local
4591 ZEND_ASSERT(out_len <= 8); in php_mb_check_encoding()
4592 for (int i = 0; i < out_len; i++) { in php_mb_check_encoding()
4599 out_len = encoding->to_wchar(&in, &length, wchar_buf, 128, &state); in php_mb_check_encoding()
4600 ZEND_ASSERT(out_len <= 128); in php_mb_check_encoding()
4601 for (int i = 0; i < out_len; i++) { in php_mb_check_encoding()
5385 …size_t out_len = enc->to_wchar((unsigned char**)&str, &str_len, wchar_buf, MBSTRING_MIN_WCHAR_BUFS… in php_mb_ord() local
5386 ZEND_ASSERT(out_len <= MBSTRING_MIN_WCHAR_BUFSIZE); in php_mb_ord()
5388 if (!out_len || wchar_buf[0] == MBFL_BAD_INPUT) { in php_mb_ord()
5899 …size_t out_len = incode->to_wchar(&in, &in_len, wchar_buf, MBSTRING_HEADER_ENC_WCHAR_BUFSIZE, &sta… in mb_mime_header_encode() local
5901 e = wchar_buf + out_len; in mb_mime_header_encode()
5934 …size_t out_len = incode->to_wchar(&in, &in_len, wchar_buf + offset, MBSTRING_HEADER_ENC_WCHAR_BUFS… in mb_mime_header_encode() local
5935 ZEND_ASSERT(out_len <= MBSTRING_HEADER_ENC_WCHAR_BUFSIZE - offset); in mb_mime_header_encode()
5937 e = wchar_buf + offset + out_len; in mb_mime_header_encode()
6051 …size_t out_len = incode->to_wchar(&in, &in_len, wchar_buf + offset, MBSTRING_HEADER_ENC_WCHAR_BUFS… in mb_mime_header_encode() local
6052 ZEND_ASSERT(out_len <= MBSTRING_HEADER_ENC_WCHAR_BUFSIZE - offset); in mb_mime_header_encode()
6054 e = wchar_buf + offset + out_len; in mb_mime_header_encode()
6340 size_t out_len = incode->to_wchar(&bufp, &in_len, wchar_buf, 128, state); in mime_header_decode_encoded_word() local
6341 ZEND_ASSERT(out_len <= 128); in mime_header_decode_encoded_word()
6342 outcode->from_wchar(wchar_buf, out_len, outbuf, false); in mime_header_decode_encoded_word()
6398 size_t out_len = mbfl_encoding_ascii.to_wchar(&p, &in_len, wchar_buf, 128, &state); in mb_mime_header_decode() local
6399 ZEND_ASSERT(out_len <= 128); in mb_mime_header_decode()
6400 outcode->from_wchar(wchar_buf, out_len, &buf, false); in mb_mime_header_decode()