Nitedula
Posts: 22
|
Posted: 07/12/2006, 1:55 PM |
|
Hi!
I've been away from coding with CCS for a while and as I now look through the Common.php - as I always do on new CCS versions - I came accross lots of new functions that I couldn't find in the manual and the "what's new" section of the Manual.
to name only some:
//CCGetOriginalFileName @0-16048768
function CCGetOriginalFileName($value)
{
return preg_match("/^\d{14,}\./", $value) ? substr($value, strpos($value, ".") + 1) : $value;
}
//End CCGetOriginalFileName
//ComposeStrings @0-B7BE7781
function ComposeStrings($str1, $str2, $delimiter = "<br>")
{
return $str1 . (strlen($str1) && strlen($str2) ? $delimiter : "") . $str2;
}
//End ComposeStrings
//CCStrLen @0-3660E806
function CCStrLen($str, $encoding = false) {
return strlen($str);
}
//End CCStrLen
//CCSubStr @0-552E6589
function CCSubStr($str, $offset, $length = null, $encoding = false) {
return is_null($length) ? substr($str, $offset) : substr($str, $offset, $length);
}
//End CCSubStr
//CCStrPos @0-BA504839
function CCStrPos($haystack, $needle, $offset = "", $encoding = false) {
return strpos($haystack, $needle, $offset);
}
//End CCStrPos
#1 why all the fuss and recode php functions (eg strlen())
#2 is there a list of all new added functions or maybe ALL functions in CCS3
TIA
|
Claudio Morinico
|
Posted: 07/12/2006, 2:18 PM |
|
#1 - Remember that PHP supports many programming languages, so maybe it
needed a common implementation for such functions
#2 - Online Help? This functions are for internal CCS use, and maybe
they forgot to update the help files.
Best Regards,
--
Claudio Morinico,
Montevideo - Uruguay
|