diff --git a/primitives/linux-port/dictionary.cpp b/primitives/linux-port/dictionary.cpp index 0e6083505..8aba1bf8a 100644 --- a/primitives/linux-port/dictionary.cpp +++ b/primitives/linux-port/dictionary.cpp @@ -167,7 +167,7 @@ void PrimitiveProcessor::p_TokenByScan(const TokenByScanRequestHeader *h, if (eqFilter) { // MCOL-1246 Trim whitespace before match string strData(sig, siglen); - boost::trim_right(strData); + boost::trim_right_if(strData, boost::is_any_if(" ")); bool gotIt = eqFilter->find(strData) != eqFilter->end(); if ((h->COP1 == COMPARE_EQ && gotIt) || (h->COP1 == COMPARE_NE && !gotIt)) @@ -775,7 +775,7 @@ void PrimitiveProcessor::p_Dictionary(const DictInput *in, vector *out, if (eqFilter) { // MCOL-1246 Trim whitespace before match string strData((char*)sigptr.data, sigptr.len); - boost::trim_right(strData); + boost::trim_right_if(strData, boost::is_any_of(" ")); bool gotIt = eqFilter->find(strData) != eqFilter->end(); if ((gotIt && eqOp == COMPARE_EQ) || (!gotIt && eqOp == COMPARE_NE)) goto store; diff --git a/utils/dataconvert/dataconvert.h b/utils/dataconvert/dataconvert.h index aba5a8bd8..d424a52f7 100644 --- a/utils/dataconvert/dataconvert.h +++ b/utils/dataconvert/dataconvert.h @@ -559,7 +559,7 @@ inline void DataConvert::trimWhitespace(int64_t &charData) char *ch_data = (char*) &charData; for (int8_t i = 7; i > 0; i--) { - if (isspace(ch_data[i]) || ch_data[i] == '\0') + if (ch_data[i] == ' ' || ch_data[i] == '\0') ch_data[i] = '\0'; else break;