- Added new line after if/else/else if

This commit is contained in:
Vijay Duvvuri
2008-09-13 11:09:09 +02:00
parent 05811ca965
commit 8aed3787fd
+7 -4
View File
@@ -144,9 +144,12 @@ var CPStringHashes = new objj_dictionary();
aString = aString.toLowerCase();
}
if (aMask & CPBackwardsSearch) location = string.lastIndexOf(aString, aMask & CPAnchoredSearch ? length - aString.length : 0);
else if (aMask & CPAnchoredSearch) location = string.substr(0, aString.length).indexOf(aString) != CPNotFound ? 0 : CPNotFound;
else location = string.indexOf(aString);
if (aMask & CPBackwardsSearch)
location = string.lastIndexOf(aString, aMask & CPAnchoredSearch ? length - aString.length : 0);
else if (aMask & CPAnchoredSearch)
location = string.substr(0, aString.length).indexOf(aString) != CPNotFound ? 0 : CPNotFound;
else
location = string.indexOf(aString);
return CPMakeRange(location, location == CPNotFound ? 0 : aString.length);
}
@@ -268,7 +271,7 @@ var CPStringHashes = new objj_dictionary();
- (CPString)stringByDeletingLastPathComponent
{
// FIMXE: this is wrong: a/a/ returns a/a/.
// FIXME: this is wrong: a/a/ returns a/a/.
return substr(0, lastIndexOf('/') + 1);
}