Use CString::StartsWith()

Replace the use of deprecated CString::Equals(str,bool,int) by
CString::StartsWith(str,cs) which is more pleasant to read.
This commit is contained in:
J-P Nurmi
2015-02-18 00:42:25 +01:00
parent a8b9542925
commit 00b1a7eedf
15 changed files with 24 additions and 28 deletions

View File

@@ -1599,8 +1599,7 @@ void CClient::UserPortCommand(CString& sLine) {
static void AddCommandHelp(CTable& Table, const CString& sCmd, const CString& sArgs, const CString& sDesc, const CString& sFilter = "")
{
const CString::size_type iFilterLength = sFilter.size();
if (sFilter.empty() || sCmd.Equals(sFilter, false, iFilterLength) || sCmd.AsLower().WildCmp(sFilter.AsLower())) {
if (sFilter.empty() || sCmd.StartsWith(sFilter) || sCmd.AsLower().WildCmp(sFilter.AsLower())) {
Table.AddRow();
Table.SetCell("Command", sCmd);
Table.SetCell("Arguments", sArgs);