<div><br></div>Hi,<div><br></div><div>The current function "UtilStrToLower" in 0.82.1 crashes because my compiler (VS2010 C++) does not see '\0' at the end of string.</div><div>Formerly it could be fixed by using :</div>
<div><div>// ------------------------------------------------------------------------- //</div><div>// returns a lower case version of the std::string in-place</div><div>inline std::string & UtilStrToLower(std::string & s) {</div>
<div> // Purify did not like this version:</div><div> // transform (s.begin(), s.end(), s.begin(), myToLower());</div><div> if(s.size() == 0)</div><div> return s;</div><div> std::transform(s.begin(), s.end(), s.begin(),std::ptr_fun<int,int>(std::tolower));</div>
<div> //int i;</div><div> //for (i = 0; s[i] != '\0'; i++)</div><div> // s[i] = static_cast<char>(tolower(s[i]));</div><div> return s;</div><div>}</div></div><div><br></div><div>instead.</div><div>
<br></div><div>Some changes seem to have been done from 0.82.0 to 0.82.1 which have tried to force C-type strings. With this change the above function does not compile because "tolower" is not longer recognized to be in the scope of STD.</div>
<div>The fix is now to use:</div><div><br></div><div><div>// ------------------------------------------------------------------------- //</div><div>// returns a lower case version of the std::string in-place</div><div>inline std::string & UtilStrToLower(std::string & s) {</div>
<div> // Purify did not like this version:</div><div> // transform (s.begin(), s.end(), s.begin(), myToLower());</div><div> if(s.size() == 0)</div><div> return s;</div><div> std::transform(s.begin(), s.end(), s.begin(),std::ptr_fun<int,int>tolower));</div>
<div> //int i;</div><div> //for (i = 0; s[i] != '\0'; i++)</div><div> // s[i] = static_cast<char>(tolower(s[i]));</div><div> return s;</div><div>}</div></div><div><div><br></div><div>This works fine.</div>
</div><div><br></div><div>regards,</div><div>Shahin</div><div><br></div>