mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-10 12:49:08 -04:00
smartened printing even further
This commit is contained in:
parent
65fd6009a2
commit
b34918c2fe
@ -49,14 +49,24 @@ void spacePrint( ostream& os,
|
||||
s[stringLen+start] != '|' )
|
||||
stringLen--;
|
||||
|
||||
// check for newlines
|
||||
for ( int i = 0; i < stringLen; i++ )
|
||||
if ( s[start+i] == '\n' )
|
||||
stringLen = i+1;
|
||||
|
||||
// print the indent
|
||||
for ( int i = 0; i < indentSpaces; i++ )
|
||||
os << " ";
|
||||
|
||||
// handle second line offsets
|
||||
if ( start == 0 )
|
||||
{
|
||||
// handle second line offsets
|
||||
indentSpaces += secondLineOffset;
|
||||
|
||||
// adjust allowed len
|
||||
allowedLen -= secondLineOffset;
|
||||
}
|
||||
|
||||
os << s.substr(start,stringLen) << endl;
|
||||
|
||||
// so we don't start a line with a space
|
||||
|
Loading…
x
Reference in New Issue
Block a user