src/Generic/common/LocatedString.cpp
/**
 * For any characters removed, the behavior is the same as in remove().
 */
For any characters removed, the behavior is the same as in remove().
For any characters removed the behavior is the same as in remove () .
void LocatedString::trim() {
	if (length() > 0) {
		int end = length()-1;
		while (end >= 0 && iswspace(_text[end])) --end;
		if (length() != end+1)
			remove(end+1, length());
		int start = 0;
		while (start < length() && iswspace(_text[start])) ++start;
		if (start != 0)
			remove(0, start);
	}
}
void LocatedString :: trim ( ) { if ( length ( ) > 0 ) { int end = length ( ) - 1 ; while ( end >= 0 && iswspace ( _text [ end ] ) ) -- end ; if ( length ( ) != end + 1 ) remove ( end + 1 , length ( ) ) ; int start = 0 ; while ( start < length ( ) && iswspace ( _text [ start ] ) ) ++ start ; if ( start != 0 ) remove ( 0 , start ) ; } }
For any characters removed, the behavior is the same as in remove().
For any characters removed the behavior is the same as in remove () .
// Remove whitespace from the end.
 // Remove whitespace from the beginning.
