2023-08-04 Fred Gleason <fredg@paravelsystems.com>

* Added copyright and license notices to the standard '--version'
	output.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2023-08-04 16:43:29 -04:00
parent fd3f9f5947
commit 8f9061d2d5
5 changed files with 39 additions and 2 deletions

View File

@@ -1179,3 +1179,25 @@ QString RDMimeType(const QByteArray &data,bool *ok)
return ret;
}
QString RDWrapText(const QString &str,int width)
{
QString line;
QString ret;
QStringList f0=str.split(" ",QString::KeepEmptyParts);
int fn=0;
while(fn<f0.size()) {
if((line.length()+1+f0.at(fn).length())<width) {
line+=" "+f0.at(fn++);
}
else {
ret+=line.trimmed()+"\n";
line="";
}
}
ret+=line.trimmed()+"\n";
return ret.trimmed();
}