Prefer TrimSuffix() over Right() + RightChomp()

This commit is contained in:
J-P Nurmi
2015-08-14 12:31:01 +02:00
parent 475acd8f00
commit 52395fad5e
3 changed files with 4 additions and 10 deletions
+1 -3
View File
@@ -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;