mirror of
https://github.com/znc/znc.git
synced 2026-08-06 08:52:57 +02:00
Prefer TrimSuffix() over Right() + RightChomp()
This commit is contained in:
+1
-3
@@ -277,9 +277,7 @@ bool CUtils::GetInput(const CString& sPrompt, CString& sRet, const CString& sDef
|
||||
}
|
||||
sInput = szBuf;
|
||||
|
||||
if (sInput.Right(1) == "\n") {
|
||||
sInput.RightChomp();
|
||||
}
|
||||
sInput.TrimSuffix("\n");
|
||||
|
||||
if (sInput.empty()) {
|
||||
sRet = sDefault;
|
||||
|
||||
Reference in New Issue
Block a user