本文整理汇总了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');
}