Functions::startsWith($needle,$haystack)
Version 4
Check if haystack starts with given needle
Version 4
Check if haystack starts with given needle
Check if haystack starts with needle. Returns the remaining part of the haystack, if needle was found. Returns false if is not found.
Bool|String Haystack without the needle, FALSE if not found
Set param if $functionCall starts with 'get'.
if ( $paramName = startsWith('get',$functionCall) ){
return $this->getParam($paramName);
}
This function a shorthand for:
if ( strpos($haystack,'get') === 0 ){
$paramName = substr($haystack , strlen($needle) );
}
else {
$paramName = false;
}