src/Generic/common/LocatedString.cpp
/**
 * From the specified position, skip empty lines backwards
 * until we find the index of the line break at the end of
 * a line with text content.
 *
 * @param A position in this string.
 * @return The end of previous line, or the start of string
 * if none found.
 **/
From the specified position, skip empty lines backwards
until we find the index of the line break at the end of
a line with text content.

@param A position in this string.
@return The end of previous line, or the start of string
if none found.
From the specified position skip empty lines backwards until we find the index of the line break at the end of a line with text content . @param A position in this string . @return The end of previous line or the start of string if none found .
int LocatedString::endOfPreviousNonEmptyLine(int index) const {
	int start = startOfLine(index);
	do {
		start--;
	} while (start >= 0 && (charAt(start) == L'\n' || charAt(start) == L'\r'));
	start++;
	if (start < 0)
		start = 0;
	return start;
}
int LocatedString :: endOfPreviousNonEmptyLine ( int index ) const { int start = startOfLine ( index ) ; do { start -- ; } while ( start >= 0 && ( charAt ( start ) == L' \n ' || charAt ( start ) == L' \r ' ) ) ; start ++ ; if ( start < 0 ) start = 0 ; return start ; }
From the specified position, skip empty lines backwards
 until we find the index of the line break at the end of
 a line with text content.
From the specified position skip empty lines backwards until we find the index of the line break at the end of a line with text content .