Bug #177: util::trim rtrim doesn't work
ID | #177 |
---|---|
Submitter | Addison |
Product | EOSERV |
Severity | Normal |
Status | CLOSED, FIXED |
Submitted | 16th Nov 2012 |
Updated | 17th Nov 2012 |
util::trim doesn't trim the right side because of a mistake of Sausage's.
The last line:
return str.substr(si, ei);
is incorrect because ei is the end index, and the second parameter of substr is the length, not position.
So it should be:
return str.substr(si, ei-si);
I have tested this and it works.
Quit being a dickhead and fix the bug Sausage :P I told you on MSN and you didn't post it, so now it's logged.
Comments
Fixed in r373. It works for trimming the right side correctly if the left side doesn't have whitespace. ;P
Updated Status to CLOSED, FIXED
Add Comment
Please don't post unless you have something relevant to the bug to say.
Do not comment to say "thanks" or "fix this please".
Please log in to add comments. EOSERV Bug Tracker > Bug #177: util::trim rtrim doesn't work