site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com stringWithCharacters:length: sounds like what you want. NSString *original = [NSString stringWithString:@"[asdf123asdf]"]; NSCharacterSet *nums = [NSCharacterSet characterSetWithCharactersInString:@" 0123456789[]"]; NSString *numFree; At 11:12 Uhr -1000 31.03.2005, Daniel Child wrote: Actually, your suggestion is precisely what I ended up using. However, I did have to use a C-String to paste the characters together because I did not find a method that does "stringFromChars." Here was my approach. int i; unichar c; int numNewChars = 0; char noNums[100]; for (i = 0; i < [original length]; i++) { c = [original characterAtIndex: i]; if (!([nums characterIsMember: c])) { noNums[numNewChars++] = c; // IS THERE A FOUNDATION METHOD THAT WORKS HERE? } } numFree = [NSString stringWithCString: noNums]; numFree = [numFree substringToIndex: numNewChars]; printf("%s", [numFree cString]); There's a much easier way for doing this: Get the -invertedSet from nums and then use -stringByTrimmingCharactersInSet: on your string instead. -- Cheers, M. Uli Kusterer ------------------------------------------------------------ "The Witnesses of TeachText are everywhere..." http://www.zathras.de _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.apple... This email sent to site_archiver@lists.apple.com