本文整理匯總了C#中NodaTime.Text.ValueCursor.MatchCaseInsensitive方法的典型用法代碼示例。如果您正苦於以下問題:C# ValueCursor.MatchCaseInsensitive方法的具體用法?C# ValueCursor.MatchCaseInsensitive怎麽用?C# ValueCursor.MatchCaseInsensitive使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類NodaTime.Text.ValueCursor
的用法示例。
在下文中一共展示了ValueCursor.MatchCaseInsensitive方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: MatchCaseInsensitive_StringNotMatched
public void MatchCaseInsensitive_StringNotMatched()
{
var value = new ValueCursor("xabcdef");
Assert.True(value.MoveNext(), "GetNext() 1");
Assert.False(value.MatchCaseInsensitive("abc", CultureInfo.InvariantCulture.CompareInfo, true));
ValidateCurrentCharacter(value, 0, 'x');
}
示例2: MatchCaseInsensitive_MatchAndMove
public void MatchCaseInsensitive_MatchAndMove()
{
var value = new ValueCursor("abcd");
Assert.True(value.MoveNext(), "GetNext() 1");
Assert.True(value.MatchCaseInsensitive("AbC", CultureInfo.InvariantCulture.CompareInfo, true));
ValidateCurrentCharacter(value, 3, 'd');
}
示例3: TestMatchCaseInsensitive_string
public void TestMatchCaseInsensitive_string()
{
var value = new ValueCursor("abc");
Assert.True(value.MoveNext(), "GetNext() 1");
Assert.True(value.MatchCaseInsensitive("AbC", CultureInfo.InvariantCulture.CompareInfo));
Assert.False(value.MoveNext(), "GetNext() end");
}
示例4: MatchCaseInsensitive_MatchWithoutMoving
public void MatchCaseInsensitive_MatchWithoutMoving()
{
var value = new ValueCursor("abcd");
Assert.True(value.MoveNext(), "GetNext() 1");
Assert.True(value.MatchCaseInsensitive("AbC", CultureInfo.InvariantCulture.CompareInfo, false));
// We're still looking at the start
ValidateCurrentCharacter(value, 0, 'a');
}
示例5: MatchCaseInsensitive_StringOverLongStringToMatch
public void MatchCaseInsensitive_StringOverLongStringToMatch()
{
var value = new ValueCursor("x");
Assert.True(value.MoveNext());
Assert.False(value.MatchCaseInsensitive("long string", CultureInfo.InvariantCulture.CompareInfo, true));
ValidateCurrentCharacter(value, 0, 'x');
}