mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-10 14:07:35 +08:00
Ref T709, display settings as string/QString (for logging)
This commit is contained in:
committed by
Mat Sutcliffe
parent
6a2f08b49f
commit
d1db1943ae
@@ -139,6 +139,22 @@ namespace BlackMisc
|
||||
});
|
||||
}
|
||||
|
||||
//! Yes/no from bool
|
||||
inline const std::string &boolToYesNo(bool t)
|
||||
{
|
||||
static const std::string y("yes");
|
||||
static const std::string n("no");
|
||||
return t ? y : n;
|
||||
}
|
||||
|
||||
//! True/false from bool
|
||||
inline const std::string &boolTotrueFalse(bool t)
|
||||
{
|
||||
static const std::string tr("true");
|
||||
static const std::string fa("false");
|
||||
return t ? tr : fa;
|
||||
}
|
||||
|
||||
//! Trim whitespace from the beginning and end, and replace sequences of whitespace with single space characters
|
||||
inline std::string simplifyWhitespace(const std::string &s)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user