You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(l<=w+1u) { // word fits -> append word and space
3817
3811
p += word+"";
3818
3812
} elseif(wordlength>w) { // word overflows -> split word into next line
3819
3813
p += substring(word, 0, w-(l-wordlength-1u))+" |\n| "+f;
3820
3814
v[i] = substring(v[i], w-(l-wordlength-1u)); i--; // reuse same vector element for overflowing part, decrement i to start next line with this overflowing part
3821
3815
l = 0u; // reset line length
3822
3816
} else { // word does not fit -> fill remaining line with spaces
3823
3817
l = l-length(v.at(i--))-1u; // remove word from line, decrement i to start next line with this word
0 commit comments