Lines Matching refs:length

3505 PHPAPI char *php_addcslashes(const char *str, int length, int *new_length, int should_free, char *w…  argument
3508 char *new_str = safe_emalloc(4, (length?length:(length=strlen(str))), 1);
3520 for (source = (char*)str, end = source + length, target = new_str; source < end; source++) {
3547 if (target - new_str < length * 4) {
3562 PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_free TSRMLS_DC) argument
3577 new_str = (char *) safe_emalloc(2, (length ? length : (length = strlen(str))), 1);
3579 end = source + length;
3700 PHPAPI char *php_str_to_str_ex(char *haystack, int length, argument
3705 if (needle_len < length) {
3710 new_str = estrndup(haystack, length);
3711 *_new_length = length;
3714 end = new_str + length;
3722 haystack_dup = estrndup(haystack, length);
3724 php_strtolower(haystack_dup, length);
3726 end = haystack_dup + length;
3739 haystack_dup = estrndup(haystack, length);
3741 php_strtolower(haystack_dup, length);
3746 new_str = emalloc(length + 1);
3758 endp = o + length;
3772 new_str = estrndup(haystack, length);
3774 *_new_length = length;
3778 new_str = safe_emalloc(count, str_len - needle_len, length + 1);
3785 end = haystack + length;
3801 end = haystack_dup + length;
3832 } else if (needle_len > length) {
3834 *_new_length = length;
3835 new_str = estrndup(haystack, length);
3838 if (case_sensitivity && memcmp(haystack, needle, length)) {
3843 l_haystack = estrndup(haystack, length);
3844 l_needle = estrndup(needle, length);
3846 php_strtolower(l_haystack, length);
3847 php_strtolower(l_needle, length);
3849 if (memcmp(l_haystack, l_needle, length)) {
3872 PHPAPI char *php_str_to_str(char *haystack, int length, argument
3875 return php_str_to_str_ex(haystack, length, needle, needle_len, str, str_len, _new_length, 1, NULL);
5197 long offset = 0, length = 0; local
5203 …TSRMLS_CC, "ss|ll", &haystack, &haystack_len, &needle, &needle_len, &offset, &length) == FAILURE) {
5228 if (length <= 0) {
5232 if (length > (haystack_len - offset)) {
5233 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length value %ld exceeds string length", length);
5236 endp = p + length;