private static object InternalCount(MutableString/*!*/ self, MutableString[]/*!*/ ranges) { BitArray map = new RangeParser(ranges).Parse(); int count = 0; for (int i = 0; i < self.Length; i++) { if (map.Get(self.GetChar(i))) count++; } return ScriptingRuntimeHelpers.Int32ToObject(count); }
private static MutableString/*!*/ InternalDelete(MutableString/*!*/ self, MutableString[]/*!*/ ranges) { BitArray map = new RangeParser(ranges).Parse(); MutableString result = self.CreateInstance().TaintBy(self); for (int i = 0; i < self.Length; i++) { if (!map.Get(self.GetChar(i))) { result.Append(self.GetChar(i)); } } return result; }