question: private int calculateRealLength ( final int position , final int length ) { return length != - 1 ? length : m_text . length ( ) - position ; }
target:  The functions that modify part of the line take a parameter length that describes how many characters are changed. This parameter can be -1 to mean "until the end of the line". This function takes the given length and converts it into the real number of characters to be modified.