mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Enhancement - caseless compare
- Fixed bug in text.cpp:find that failed to locate a substring if it occurred at the end of the string.
This commit is contained in:
parent
0c5a71b02f
commit
4f1183a358
3 changed files with 62 additions and 43 deletions
|
@ -497,7 +497,7 @@ std::string::size_type find (
|
|||
const char* start = t;
|
||||
const char* end = start + text.size ();
|
||||
|
||||
for (; t < end - len; ++t)
|
||||
for (; t <= end - len; ++t)
|
||||
{
|
||||
int diff;
|
||||
for (size_t i = 0; i < len; ++i)
|
||||
|
@ -544,7 +544,7 @@ std::string::size_type find (
|
|||
const char* t = start + begin;
|
||||
const char* end = start + text.size ();
|
||||
|
||||
for (; t < end - len; ++t)
|
||||
for (; t <= end - len; ++t)
|
||||
{
|
||||
int diff;
|
||||
for (size_t i = 0; i < len; ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue