Пример #1
0
        public static RubyArray /*!*/ Offset(MatchData /*!*/ self, [DefaultProtocol] int groupIndex)
        {
            var       group  = self.GetExistingGroup(groupIndex);
            RubyArray result = new RubyArray(2);

            if (group.Success)
            {
                result.Add(group.Index);
                result.Add(group.Index + group.Length);
            }
            else
            {
                result.Add(null);
                result.Add(null);
            }
            return(result);
        }
Пример #2
0
 public static RubyArray/*!*/ Offset(MatchData/*!*/ self, [DefaultProtocol]int groupIndex) {
     var group = self.GetExistingGroup(groupIndex);
     RubyArray result = new RubyArray(2);
     if (group.Success) {
         result.Add(group.Index);
         result.Add(group.Index + group.Length);
     } else {
         result.Add(null);
         result.Add(null);
     }
     return result;
 }
Пример #3
0
 public static object End(MatchData/*!*/ self, [DefaultProtocol]int groupIndex) {
     var group = self.GetExistingGroup(groupIndex);
     return group.Success ? ScriptingRuntimeHelpers.Int32ToObject(group.Index + group.Length) : null;
 }
Пример #4
0
        public static object End(MatchData /*!*/ self, [DefaultProtocol] int groupIndex)
        {
            var group = self.GetExistingGroup(groupIndex);

            return(group.Success ? ScriptingRuntimeHelpers.Int32ToObject(group.Index + group.Length) : null);
        }