本文整理汇总了C#中IronRuby.StandardLibrary.StringScanner.StringScanner.Reset方法的典型用法代码示例。如果您正苦于以下问题:C# StringScanner.Reset方法的具体用法?C# StringScanner.Reset怎么用?C# StringScanner.Reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IronRuby.StandardLibrary.StringScanner.StringScanner
的用法示例。
在下文中一共展示了StringScanner.Reset方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Unscan
public static StringScanner Unscan(StringScanner/*!*/ self)
{
if (self.LastMatch == null) {
// throw Exception StringScanner::Error
throw RubyExceptions.CreateRangeError("unscan failed: previous match had failed");
}
int position = self.PreviousPosition;
self.Reset();
self.CurrentPosition = position;
return self;
}
示例2: Reset
public static StringScanner Reset(StringScanner/*!*/ self)
{
self.Reset();
return self;
}
示例3: SetString
public static MutableString SetString(RubyContext/*!*/ context, StringScanner/*!*/ self, [NotNull]MutableString/*!*/ str)
{
self.ScanString = (MutableString)KernelOps.Freeze(context, MutableString.Create(str));
self.Reset();
return str;
}
示例4: Reinitialize
public static void Reinitialize(StringScanner/*!*/ self, [DefaultProtocol, NotNull]MutableString/*!*/ scan, [Optional]object ignored)
{
self.ScanString = scan;
self.Reset();
}
示例5: Create
public static StringScanner Create(RubyClass/*!*/ self, [DefaultProtocol, NotNull]MutableString/*!*/ scan, [Optional]object ignored)
{
var result = new StringScanner(self);
result.ScanString = scan;
result.Reset();
return result;
}
示例6: Clear
public static StringScanner Clear(StringScanner/*!*/ self)
{
self.Reset();
self.CurrentPosition = self.Length;
return self;
}
示例7: Reinitialize
public static void Reinitialize(StringScanner/*!*/ self, [DefaultProtocol, NotNull]MutableString/*!*/ scan) {
self.ScanString = scan;
self.Reset();
}
示例8: Create
public static StringScanner/*!*/ Create(RubyClass/*!*/ self, [DefaultProtocol, NotNull]MutableString/*!*/ scan) {
var result = new StringScanner(self);
result.ScanString = scan;
result.Reset();
return result;
}