/** * Converts strings to camelize style * *<code> * echo Phalcon\Text::camelize('coco_bongo'); //CocoBongo *</code> * * @param string $str * @return string */ PHP_METHOD(Phalcon_Text, camelize) { zval *str; phalcon_fetch_params(0, 1, 0, &str); phalcon_camelize(return_value, str); return; }
/** * Converts strings to camelize style * *<code> * echo Phalcon\Text::camelize('coco_bongo'); //CocoBongo *</code> * * @param string $str * @return string */ PHP_METHOD(Phalcon_Text, camelize){ zval *str, *camelized; PHALCON_MM_GROW(); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &str) == FAILURE) { PHALCON_MM_RESTORE(); RETURN_NULL(); } PHALCON_INIT_VAR(camelized); phalcon_camelize(camelized, str TSRMLS_CC); RETURN_CCTOR(camelized); }