LineBreaksBeforePosition() public static méthode

Determines number of line breaks before position
public static LineBreaksBeforePosition ( ITextIterator iterator, int position ) : int
iterator ITextIterator
position int
Résultat int
Exemple #1
0
        public int CopyPrecedingLineBreaks(ITextIterator iterator, int position)
        {
            int lineBreakCount     = Whitespace.LineBreaksBeforePosition(iterator, position);
            int recentlyAddedCount = RecentlyAddedLineBreakCount();
            int breaks             = lineBreakCount - recentlyAddedCount;

            for (int i = 0; i < breaks; i++)
            {
                HardLineBreak();
            }

            return(breaks);
        }
Exemple #2
0
 private int RecentlyAddedLineBreakCount()
 {
     return(Whitespace.LineBreaksBeforePosition(new StringBuilderIterator(_formattedText), _formattedText.Length));
 }