Questions tagged [nsmutablestring]

The NSMutableString class declares the programmatic interface to an object that manages a mutable string — that is, a string whose contents can be edited — that conceptually represents an array of Unicode characters.

To construct and manage an immutable string — or a string that cannot be changed after it has been created — use an object of the NSString class.

The NSMutableString () class adds one primitive method

-replaceCharactersInRange:withString:

to the basic string-handling behavior inherited from NSString . All other methods that modify a string work through this method.

More information : NSMutableString Class reference

306 questions
-1
votes
2 answers

NSArray question - \n\t\t being added to the end of strings?

My strings are fine, but when they get added to an array a weird grouping of "\n\t\t" gets added to the end. So the string "Apple", becomes "Apple\n\t\t" when I look at the array description. Whats the deal with that? and how do I fix…
Zac Altman
  • 1,215
  • 4
  • 25
  • 37
-1
votes
2 answers

Capture a value inside of a NSLog Result

Editing for clarification The userID is generated on the server side, so I don't actually retrieve the userID until after I POST the newly registered username and password. Like so: NSMutableURLRequest *request = [NSMutableURLRequest…
f00d
  • 581
  • 1
  • 6
  • 21
-1
votes
1 answer

Sorting NSMutableArray contains NSMutableString in Objective C

Newbie Question, I am playing with NSMutableArray *myBook that contains card elements (name and email address). I want myBook displayed with descending list. AddressBook.h #import #import "AddressCard.h" @interface…
-1
votes
2 answers

Create arrays with different Names

i want to create arrays with different *names (the text out of a textField should be the name of the array) when an IBAction function is called. How do i get the text out of the text field and make it the *name of the array? -…
user3138007
  • 637
  • 1
  • 6
  • 19
-1
votes
2 answers

How to access a character in NSMutableString Objective-C

I have an instance of NSMutableString called MyMutableStr and I want access its character at index 7. For example: unsigned char cMy = [(NSString*) MyMutableStr characterAtIndex:7]; I think this is an ugly way; it's too much code. My question is:…
Vetal
  • 13
  • 2
  • 7
-1
votes
1 answer

how to detect is NSMutableAttributedString attribute NSStrikethroughStyleAttributeName available to use?

I mean detect is i'm able to use attribute NSStrikethroughStyleAttributeName ofNSMutableAttributedString like: if ([object responseToSelector:@selector(someSelector)]) or like: if ([SomeNewClass class]) i don't wan't compare system version, but i…
Evgeniy S
  • 1,464
  • 12
  • 32
-1
votes
1 answer

NSMutableString appendString in first position

I have a NSMutableString variable that i append from aString, like this: NSString *aString = [NSString…
user2373192
  • 31
  • 1
  • 5
-1
votes
2 answers

How to Compare Two Different Strings (string1 contains string2)

I am having Two Strings:string1 and string2. String1 contains only "ball", string2 contains "ball,fruit,doll". Now i need to compare the string1 and string2, ball is in both the strings or not? and i need to remove the ball after comparing the…
Krishna1251
  • 177
  • 1
  • 10
-1
votes
2 answers

what is actual difference between NSString and NSMutableString in objective C with the help of example?

what is actual difference between NSString and NSMutable String in Objective-C? I have searched a lot but not getting any answer..I understand that NSString is Immutable object and NSMutableString is Mutable object but I want to understand the…
user1960279
  • 494
  • 1
  • 8
  • 24
-1
votes
2 answers

NSXMLParser:foundCharacters throwing 'Attempt to mutate immutable object with appendString:'

I have a problem when parsing an XML feed. There are approximately 15 child nodes per parent node. Currently I am parsing all nodes using stringbytrimmingchartersinset: then NSCharacterset whitespaceandnewline characterset. Like so: - (void)…
kev
  • 2,306
  • 3
  • 26
  • 31
-2
votes
1 answer

What is the difference between String and NSMutableString?

What is the difference between String and NSString?
user10595407
-2
votes
1 answer

IOS How to get String.range(of:string) multiple in swift

MyText is let myString: NSAttributedString = 123123 123123 let myRange = myString.string.range(of:"") let newString = NSMutableAttributedString() newString.append(myString) if myRange != nil{ …
Adam
  • 325
  • 1
  • 4
  • 20
-2
votes
3 answers

How to change the values in the string between the letters

I have string something like @"goodhouse=30&app=60&val=30askldkla" How can I found the value 30 between house= and &, and change it on 50?
user2398911
  • 96
  • 1
  • 14
-3
votes
1 answer

NSMutableString in iOS

How can I apply uppercaseString on NSMutableString? In this code the value in string2 is not changing in second NSLog: NSMutableString *string2=[[NSMutableString alloc]initWithCapacity:100]; [string2 appendFormat:@"%@ Objective…
-3
votes
1 answer

How to append two NSMutableAttributeString in swift

how to join two NSMutableAttributeString into single NSMutableAttributeString in swift
rajes
  • 251
  • 2
  • 4
  • 8
1 2 3
20
21