On Fri, Sep 5, 2008 at 1:53 PM, Steve Weller <[EMAIL PROTECTED]> wrote: > > From memory I think that does not work: capitalizedString also decapitalizes > all but the first character, so capitalizedString will become > setCapitalizedstring instead of setCapitalizedString. >
Gah, you're right! I guess the only way to do it then is with an NSMutableString: NSMutableString *getterName = [NSStringFromSelector(...) mutableCopy] [getterName replaceCharactersInRange:NSMakeRange(0, 1) withString:[[getterName substringToIndex:1] uppercaseString]]; Maybe it is easier with C strings: const char *getterName = sel_getName(...) char *getterName_m = strdup(getterName); getterName_m[0] = toupper(getterName_m[0]); // and clean up... Phil _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]