Exemplo n.º 1
0
 private static void RemoveProhibitedControlCharacters(char[] charBuffer, int offset, int length)
 {
     while (length != 0)
     {
         char c = charBuffer[offset];
         if (c < ' ')
         {
             charBuffer[offset] = ValueDecoder.ReplaceProhibitedControlCharacter(c);
         }
         offset++;
         length--;
     }
 }
Exemplo n.º 2
0
        private void ZeroExpandFragment(ValuePosition start, ValuePosition end, bool allowControlCharacters, StringBuilder sb)
        {
            ValueIterator valueIterator = new ValueIterator(this.iterator.Lines, this.iterator.LinesMask, start, end);

            while (!valueIterator.Eof)
            {
                byte b = (byte)valueIterator.Get();
                if (!allowControlCharacters && b < 32)
                {
                    b = (byte)ValueDecoder.ReplaceProhibitedControlCharacter((char)b);
                }
                sb.Append((char)b);
            }
        }