mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-16 21:41:18 +00:00
Fixed: CPString rangeOfString: backwards search did not work. Fixes #1065.
This commit is contained in:
1 parent
06122bba19
commit
b29e722132
1 file changed
+1
-1
@@ -375,7 +375,7 @@ var CPStringRegexSpecialCharacters = [
|
||||
}
|
||||
|
||||
if (aMask & CPBackwardsSearch)
|
||||
location = string.lastIndexOf(aString, aMask & CPAnchoredSearch ? length - aString.length : 0);
|
||||
location = string.lastIndexOf(aString, aMask & CPAnchoredSearch ? string.length - aString.length : string.length);
|
||||
else if (aMask & CPAnchoredSearch)
|
||||
location = string.substr(0, aString.length).indexOf(aString) != CPNotFound ? 0 : CPNotFound;
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user