views:

47

answers:

1
NSMutableString *str = [[NSMutableString alloc] init];

Suppose str has right know a value "me".

And On click of a button I want that the value of str get reset. That is the string value become nil or empty.

now i am using this [myword stringWithString: @""]; but not working.

+2  A: 

Use setString with "" as parameter.

[myWord setString:@""];

And if you want to make it nil, then release it and then set it to nil.

[myWord release];
myWord = nil;
taskinoor