Revize c478920d
Přidáno uživatelem Ondřej Fibich před asi 9 roky(ů)
application/helpers/text.php | ||
---|---|---|
* @author Ondřej Fibich
|
||
* @param string $str String
|
||
* @param string $start Start
|
||
* @param bool $icase Ignore case? [optional]
|
||
* @return bool true if first string starts with second
|
||
*/
|
||
public static function starts_with($str, $start, $icase = FALSE)
|
||
public static function starts_with($str, $start)
|
||
{
|
||
if ($icase === TRUE)
|
||
{
|
||
return strncasecmp($str, $start, mb_strlen($start)) == 0;
|
||
}
|
||
else
|
||
{
|
||
return strncmp($str, $start, mb_strlen($start)) == 0;
|
||
}
|
||
return strncmp($str, $start, mb_strlen($start)) == 0;
|
||
}
|
||
|
||
/**
|
Také k dispozici: Unified diff
Undo my stupid mistake (I have pushed issue-957 to master instead of develop). Do I have copied files from GitHub master and push them back..