logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: bug in stringhelper: msg#00028

Subject: Re: bug in stringhelper
The patch you sent seems to be modifying StringHelper::endsWith, not ::startsWith and then intent was that

StringHelper::endsWith("foobar", "bar") == true

I believe the existing code would do that and the patched version would not but haven't had a chance to create a unit test case for those functions.

Could you describe the symptom that you believe that a bug in StringHelper is causing? It would be helpful if you could also create a test case for every bug that you fix so that we can detect regressions. I'd also prefer that you use Jira to submit patches.

On Jan 13, 2005, at 2:50 PM, Tommi Mäkitalo wrote:


Hi,

There is a bug in StringHelper::startsWith: "std::string::compare(size_type pos, size_type len, const std::string& s)" compares a substring of the string with s and not vice versa.

Here is a patch.

After that it works at least with easy cases on my x86-64.

Thank you Curt. I vote for a 0.9.8 soon.


Tommi
<stringhelper.diff>




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>