src/Generic/common/LocatedString.cpp
/**
 * From the specified position, skip characters backwards until
 * we find a line break. If index is a line break, index is returned.
 *
 * @param A position in this string.
 * @return The start of this line, or the start of string if none found.
 **/
From the specified position, skip characters backwards until
we find a line break. If index is a line break, index is returned.

@param A position in this string.
@return The start of this line, or the start of string if none found.
From the specified position skip characters backwards until we find a line break . If index is a line break index is returned . @param A position in this string . @return The start of this line or the start of string if none found .
int LocatedString::startOfLine(int index) const {
	int start = index;
	do {
		start--;
	} while (start >= 0 && charAt(start) != L'\n' && charAt(start) != L'\r');
	start++;
	if (start < 0)
		start = 0;
	return start;
}
int LocatedString :: startOfLine ( int index ) const { int start = 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 characters backwards until
 we find a line break.
From the specified position skip characters backwards until we find a line break .