public static function startsWith($str, $prefix)
    {
        return ((null === $str) && (null === $prefix))
            ? true
            : self::substring($str, 0, self::length($prefix)) === $prefix;
    }