Exemple #1
0
 public static Boolean IsAnyOf(this Char source, Char[] chars)
 {
     for (int i = 0; i < chars.Count(); i++)
     {
         if (source == chars[i]) { return true; }
     }
     return false;
 }
Exemple #2
0
        public virtual Int32 Peek(Char[] buffer, Int32 index, Int32 count)
        {
            if (buffer == null)
                throw new ArgumentNullException();
            if (index < 0 || count < 0)
                throw new ArgumentOutOfRangeException();

            var bufferedCount = this.Buffering(count);
            var bufferReadableCount = buffer.Count() - index;

            var readableCount = Math.Min(count, Math.Min(bufferReadableCount, bufferedCount));
            Array.Copy(_buffer, _bufferPtrBegin, buffer, index, readableCount);

            return readableCount;
        }
Exemple #3
0
		public List<Tuple<int, int>> Find(Char[] input) => Find(input, 0, input.Count());