RETURN_FALSE;
}
- RETVAL_ASCII_STRINGL(result, newlen, 0);
- if (UG(unicode)) {
- efree(result);
- }
+ RETVAL_ASCII_STRINGL(result, newlen, ZSTR_AUTOFREE);
}
/* }}} */
long limit = -1;
int argc = ZEND_NUM_ARGS();
- if ( argc < 2 || argc > 3 ) {
- WRONG_PARAM_COUNT;
- }
-
- if ( zend_parse_parameters(argc TSRMLS_CC, "TT|l", &delim, &delim_len, &delim_type,
- &str, &str_len, &str_type, &limit) == FAILURE) {
+ if (zend_parse_parameters(argc TSRMLS_CC, "TT|l", &delim, &delim_len, &delim_type,
+ &str, &str_len, &str_type, &limit) == FAILURE) {
return;
}
}
/* }}} */
-/* {{{ proto string join([string glue,] array pieces)
+/* {{{ proto string join([string glue,] array pieces) U
An alias for implode */
/* }}} */
int delim_found, token_present;
int skipped = 0;
- if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 2) {
- WRONG_PARAM_COUNT;
- }
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "T|T",
&str, &str_len, &str_type,
&tok, &tok_len, &tok_type) == FAILURE) {
}
/* }}} */
-/* {{{ proto string strtoupper(string str)
+/* {{{ proto string strtoupper(string str) U
Makes a string uppercase */
PHP_FUNCTION(strtoupper)
{
}
/* }}} */
-/* {{{ proto string strtolower(string str)
+/* {{{ proto string strtolower(string str) U
Makes a string lowercase */
PHP_FUNCTION(strtolower)
{
/* }}} */
-/* {{{ proto string strtotitle(string str)
+/* {{{ proto string strtotitle(string str) U
Makes a string titlecase */
PHP_FUNCTION(strtotitle)
{
}
/* }}} */
-/* {{{ proto string strchr(string haystack, string needle[, bool part])
+/* {{{ proto string strchr(string haystack, string needle[, bool part]) U
An alias for strstr */
/* }}} */
sum += php_u_similar_char(txt1, pos1, txt2, pos2);
}
if ((pos1 + end1 < len1) && (pos2 + end2 < len2)) {
- /* FIXME should this be calling php_u_similar_char? */
- sum += php_similar_char((UChar *)txt1+pos1+end1, len1-pos1-end1,
+ sum += php_u_similar_char((UChar *)txt1+pos1+end1, len1-pos1-end1,
(UChar *)txt2+pos2+end2, len2-pos2-end2);
}
}