ScriptFUSION\Porter\Type\StringType::startsWith PHP Метод

startsWith() публичный статический Метод

public static startsWith ( $string, $start )
    public static function startsWith($string, $start)
    {
        return strpos($string, $start) === 0;
    }

Usage Example

Пример #1
0
 public function testStartsWith()
 {
     self::assertTrue(StringType::startsWith('foo', 'f'));
     self::assertTrue(StringType::startsWith('foo', 'foo'));
     self::assertFalse(StringType::startsWith('foo', 'oo'));
     self::assertFalse(StringType::startsWith('f', 'foo'));
 }
All Usage Examples Of ScriptFUSION\Porter\Type\StringType::startsWith