mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-06 04:35:32 +00:00
- implement stringByDeletingPathExtension
This commit is contained in:
1 parent
1ff873e170
commit
33f56bb203
1 file changed
+9
@@ -699,6 +699,15 @@ var CPStringRegexSpecialCharacters = [
|
||||
return path;
|
||||
}
|
||||
|
||||
/*!
|
||||
Deletes the extension of a string.
|
||||
This method assumes that the string's contents is the path to a file or just a filename.
|
||||
*/
|
||||
- (CPString)stringByDeletingPathExtension
|
||||
{
|
||||
return substr(0, [self length] - ([self pathExtension].length + 1));
|
||||
}
|
||||
|
||||
- (CPString)stringByStandardizingPath
|
||||
{
|
||||
return objj_standardize_path(self);
|
||||
|
||||
Reference in new issue
Block a user