本文整理汇总了PHP中QString::StartsWith方法的典型用法代码示例。如果您正苦于以下问题:PHP QString::StartsWith方法的具体用法?PHP QString::StartsWith怎么用?PHP QString::StartsWith使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QString
的用法示例。
在下文中一共展示了QString::StartsWith方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testEndsWithStartsWith
public function testEndsWithStartsWith()
{
$this->assertTrue(QString::StartsWith("This is a test", "This"));
$this->assertFalse(QString::StartsWith("This is a test", "this"));
$this->assertTrue(QString::StartsWith("This is a test", "Thi"));
$this->assertFalse(QString::StartsWith("This is a test", "is a"));
$this->assertFalse(QString::StartsWith("This is a test", "X"));
$this->assertTrue(QString::StartsWith("This is a test", ""));
$this->assertTrue(QString::EndsWith("This is a test", "test"));
$this->assertFalse(QString::EndsWith("This is a test", "Test"));
$this->assertTrue(QString::EndsWith("This is a test", "est"));
$this->assertFalse(QString::EndsWith("This is a test", "is a"));
$this->assertFalse(QString::EndsWith("This is a test", "X"));
$this->assertTrue(QString::EndsWith("This is a test", ""));
}