예제 #1
0
파일: Extension.cs 프로젝트: Aspirq/GSTcp
 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;
 }
예제 #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;
        }
예제 #3
0
파일: Searcher.cs 프로젝트: xyandro/NeoEdit
		public List<Tuple<int, int>> Find(Char[] input) => Find(input, 0, input.Count());