mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Update string methods
This commit is contained in:
parent
96aa395afb
commit
8108fe7a37
2 changed files with 10 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
- (NSString *) capitalizedFirstCharacterString;
|
||||
- (NSString *) splitCamelCaseString;
|
||||
- (NSString *) splitCamelCaseStringStartingFromIndex: (NSUInteger)index;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -20,6 +20,15 @@
|
|||
[self substringFromIndex: 1]];
|
||||
}
|
||||
|
||||
- (NSString *) splitCamelCaseStringStartingFromIndex: (NSUInteger)index
|
||||
{
|
||||
NSString *newString = [self substringFromIndex: index];
|
||||
NSString *firstPartOfString = [newString substringToIndex: index];
|
||||
|
||||
NSString *result = [newString splitCamelCaseString];
|
||||
return [NSString stringWithFormat: @"%@%@", firstPartOfString, result];
|
||||
}
|
||||
|
||||
// Split a camel case string into a string with spaces
|
||||
// e.g. "camelCaseString" becomes "camel Case String"
|
||||
- (NSString *) splitCamelCaseString
|
||||
|
|
Loading…
Reference in a new issue