Re: NSString and NSMutableString
Re: NSString and NSMutableString
- Subject: Re: NSString and NSMutableString
- From: Carmin Politano <email@hidden>
- Date: Sat, 14 Apr 2007 21:32:42 -0400
To get even more specific:
NSMutableString * seachQuery = [NSMutableString stringWithString:
[searchField stringValue]];
On Apr 14, 2007, at 9:19 PM, Michael Novak wrote:
sorry....
NSString *beginURL = @"http://www.google.com/search?hl=en&q=";
NSMutableString *searchQuery;
[searchQuery setString:[searchField stringValue]];
//catch the whitespace.
[searchQuery replaceOccurrencesOfString:@" " withString:@"+"
options:2 range:NSMakeRange(0, [searchQuery length])];
NSString *endURL = @"&btnG=Google+Search";
NSString *tempURL = [beginURL stringByAppendingString:searchQuery];
NSString *searchCall = [tempURL stringByAppendingString:endURL];
}
cheers,
mike
On Apr 14, 2007, at 9:11 PM, Philip Q wrote:
On 15/04/07, Michael Novak <email@hidden> wrote:
I am trying to take the whitespace " " out of a string and
replace it
with a + character. I have read through the documentation and tried
using replaceOccurrencesOfString but the app is crashing when
text is
entered in the field. Am I not using the right method?
A bit of source code to see where and how you're using it would be
very helpful in seeing what's wrong.
-Phil
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
40verizon.net
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden