Exemplo n.º 1
0
 private StringOperand(string source, LineSeparators lineBreaks, int start, int length, int lineBreakSpanStart, int lineBreakCount)
 {
     _source             = source;
     _lineBreaks         = lineBreaks;
     _textSpanStart      = start;
     _lineBreakSpanStart = lineBreakSpanStart;
     Length         = length;
     LineBreakCount = lineBreakCount;
 }
Exemplo n.º 2
0
 public StringOperand(string source)
 {
     _lineBreaks         = LineSeparators.CreateLineBreaks(source);
     _source             = source;
     _textSpanStart      = 0;
     _lineBreakSpanStart = 0;
     LineBreakCount      = _lineBreaks.Count;
     Length = _source.Length;
 }
Exemplo n.º 3
0
        public static LineSeparators CreateLineBreaks(string source)
        {
            LineSeparators lineBreaks = new LineSeparators();
            int            i          = 0;

            while (i < source.Length)
            {
                int num = LengthOfLineBreak(source, i);
                if (num == 0)
                {
                    i++;
                    continue;
                }
                lineBreaks.Add(i, num);
                i += num;
            }
            return(lineBreaks);
        }