Lines Matching refs:in_len
99 static const mbfl_encoding* mb_guess_encoding(unsigned char *in, size_t in_len, const mbfl_encoding…
1615 size_t in_len = ZSTR_LEN(str); in PHP_FUNCTION() local
1618 while (in_len) { in PHP_FUNCTION()
1619 …size_t out_len = MBSTRG(current_internal_encoding)->to_wchar(&in, &in_len, wchar_buf, 128, &MBSTRG… in PHP_FUNCTION()
1621 encoding->from_wchar(wchar_buf, out_len, &buf, !in_len && last_feed); in PHP_FUNCTION()
1695 size_t in_len = ZSTR_LEN(str); in PHP_FUNCTION() local
1700 while (in_len) { in PHP_FUNCTION()
1701 size_t out_len = enc->to_wchar(&p, &in_len, wchar_buf, 128, &state); in PHP_FUNCTION()
1717 enc->from_wchar(wchar_buf, out_len, &buf, !in_len); in PHP_FUNCTION()
1734 enc->from_wchar(wchar_buf + i, out_len - i, &buf, !in_len); in PHP_FUNCTION()
1832 size_t in_len = ZSTR_LEN(string); in mb_get_strlen() local
1836 while (in_len) { in mb_get_strlen()
1837 len += encoding->to_wchar(&in, &in_len, wchar_buf, 128, &state); in mb_get_strlen()
2091 static zend_string* mb_get_substr_slow(unsigned char *in, size_t in_len, size_t from, size_t len, c… in mb_get_substr_slow() argument
2097 …mb_convert_buf_init(&buf, MIN(len, in_len - from), MBSTRG(current_filter_illegal_substchar), MBSTR… in mb_get_substr_slow()
2099 while (in_len && len) { in mb_get_substr_slow()
2100 size_t out_len = enc->to_wchar(&in, &in_len, wchar_buf, 128, &state); in mb_get_substr_slow()
2107 enc->from_wchar(wchar_buf + from, needed_codepoints, &buf, !in_len || out_len >= len); in mb_get_substr_slow()
2119 size_t in_len = ZSTR_LEN(input); in mb_get_substr() local
2121 if (len == 0 || (from >= in_len && enc != &mbfl_encoding_sjis_mac)) { in mb_get_substr()
2135 if (from >= in_len) { in mb_get_substr()
2139 in_len -= from; in mb_get_substr()
2140 if (len > in_len) { in mb_get_substr()
2141 len = in_len; in mb_get_substr()
2146 return mb_get_substr_slow(in, in_len, from, len, enc); in mb_get_substr()
2499 size_t in_len = ZSTR_LEN(string); in mb_get_strwidth() local
2502 while (in_len) { in mb_get_strwidth()
2503 size_t out_len = enc->to_wchar(&in, &in_len, wchar_buf, 128, &state); in mb_get_strwidth()
2540 size_t in_len = ZSTR_LEN(input); in mb_trim_string() local
2548 while (in_len) { in mb_trim_string()
2549 out_len = enc->to_wchar(&in, &in_len, wchar_buf, 128, &state); in mb_trim_string()
2611 in_len = ZSTR_LEN(input); in mb_trim_string()
2615 out_len = enc->to_wchar(&in, &in_len, wchar_buf, 128, &state); in mb_trim_string()
2630 ZEND_ASSERT(in_len > 0); in mb_trim_string()
3038 size_t in_len = ZSTR_LEN(str); in trim_each_wchar() local
3045 while (in_len) { in trim_each_wchar()
3046 out_len = enc->to_wchar(&in, &in_len, wchar_buf, 128, &state); in trim_each_wchar()
3233 size_t in_len; member
3239 …ngth, const mbfl_encoding **encodings, const unsigned char **in, size_t *in_len, size_t n, bool st… in init_candidate_array() argument
3254 if (!enc->check((unsigned char*)in[k], in_len[k])) { in init_candidate_array()
3275 …c void start_string(struct candidate *array, size_t length, const unsigned char *in, size_t in_len) in start_string() argument
3281 array[i].in_len = in_len; in start_string()
3285 if (in_len >= 3 && in[0] == 0xEF && in[1] == 0xBB && in[2] == 0xBF) { in start_string()
3286 array[i].in_len -= 3; in start_string()
3290 if (in_len >= 2 && in[0] == 0xFE && in[1] == 0xFF) { in start_string()
3291 array[i].in_len -= 2; in start_string()
3295 if (in_len >= 2 && in[0] == 0xFF && in[1] == 0xFE) { in start_string()
3296 array[i].in_len -= 2; in start_string()
3309 if (array[i].in_len == 0) { in count_demerits()
3318 if (array[i].in_len) { in count_demerits()
3320 …size_t out_len = enc->to_wchar((unsigned char**)&array[i].in, &array[i].in_len, wchar_buf, 128, &a… in count_demerits()
3342 if (array[i].in_len == 0) { in count_demerits()
3402 static const mbfl_encoding* mb_guess_encoding(unsigned char *in, size_t in_len, const mbfl_encoding… in mb_guess_encoding() argument
3404 …return mb_guess_encoding_for_strings((const unsigned char**)&in, &in_len, 1, elist, elist_size, st… in mb_guess_encoding()
3536 size_t in_len = ZSTR_LEN(input); in jp_kana_convert() local
3539 …mb_convert_buf_init(&buf, in_len, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filter_… in jp_kana_convert()
3541 while (in_len) { in jp_kana_convert()
3545 …size_t out_len = encoding->to_wchar(&in, &in_len, wchar_buf + buf_offset, 64 - buf_offset, &state); in jp_kana_convert()
3571 if (!in_len) { in jp_kana_convert()
3585 encoding->from_wchar(converted_buf, converted - converted_buf, &buf, !in_len); in jp_kana_convert()
3974 size_t in_len = ZSTR_LEN(input); in html_numeric_entity_encode() local
3977 …mb_convert_buf_init(&buf, in_len, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filter_… in html_numeric_entity_encode()
3979 while (in_len) { in html_numeric_entity_encode()
3981 size_t out_len = encoding->to_wchar(&in, &in_len, wchar_buf, 32, &state); in html_numeric_entity_encode()
4025 encoding->from_wchar(converted_buf, converted - converted_buf, &buf, !in_len); in html_numeric_entity_encode()
4091 size_t in_len = ZSTR_LEN(input); in html_numeric_entity_decode() local
4094 …mb_convert_buf_init(&buf, in_len, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filter_… in html_numeric_entity_decode()
4115 while (in_len) { in html_numeric_entity_decode()
4117 …size_t out_len = encoding->to_wchar(&in, &in_len, wchar_buf + wchar_buf_offset, 127 - wchar_buf_of… in html_numeric_entity_decode()
4132 encoding->from_wchar(wchar_buf, out_len, &buf, !in_len); in html_numeric_entity_decode()
4155 if ((p2 == wchar_buf + out_len) && in_len && (p2 - p) <= HEX_ENTITY_MAXLEN) { in html_numeric_entity_decode()
4193 if ((p2 == wchar_buf + out_len) && in_len && (p2 - p) <= DEC_ENTITY_MAXLEN) { in html_numeric_entity_decode()
4227 } else if ((p2 == wchar_buf + out_len) && in_len) { in html_numeric_entity_decode()
4257 encoding->from_wchar(converted_buf, converted - converted_buf, &buf, !in_len); in html_numeric_entity_decode()
6153 size_t in_len = ZSTR_LEN(input); in mb_mime_header_encode() local
6158 if (!in_len) { in mb_mime_header_encode()
6190 while (in_len) { in mb_mime_header_encode()
6191 …size_t out_len = incode->to_wchar(&in, &in_len, wchar_buf, MBSTRING_HEADER_ENC_WCHAR_BUFSIZE, &sta… in mb_mime_header_encode()
6207 in_len = ZSTR_LEN(input); in mb_mime_header_encode()
6218 mb_convert_buf_init(&buf, in_len, '?', MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR); in mb_mime_header_encode()
6223 while (in_len) { in mb_mime_header_encode()
6226 …size_t out_len = incode->to_wchar(&in, &in_len, wchar_buf + offset, MBSTRING_HEADER_ENC_WCHAR_BUFS… in mb_mime_header_encode()
6284 if (in_len) { in mb_mime_header_encode()
6330 mb_convert_buf_init(&tmpbuf, in_len, '?', MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR); in mb_mime_header_encode()
6343 …size_t out_len = incode->to_wchar(&in, &in_len, wchar_buf + offset, MBSTRING_HEADER_ENC_WCHAR_BUFS… in mb_mime_header_encode()
6389 ZEND_ASSERT(!in_len); in mb_mime_header_encode()
6419 if (in_len || p < e) { in mb_mime_header_encode()
6425 if (in_len && (MBSTRING_HEADER_ENC_WCHAR_BUFSIZE - offset >= MBSTRING_MIN_WCHAR_BUFSIZE)) { in mb_mime_header_encode()
6627 size_t in_len = bufp - buf; in mime_header_decode_encoded_word() local
6631 while (in_len) { in mime_header_decode_encoded_word()
6632 size_t out_len = incode->to_wchar(&bufp, &in_len, wchar_buf, 128, state); in mime_header_decode_encoded_word()
6688 size_t in_len = end - p; in mb_mime_header_decode() local
6689 while (in_len) { in mb_mime_header_decode()
6690 size_t out_len = mbfl_encoding_ascii.to_wchar(&p, &in_len, wchar_buf, 128, &state); in mb_mime_header_decode()