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
-3
votes
3 answers

Append a string inside loop in iOS

I'm using below code to append a string received from server in for loop. I'm not able to figure it out what is going wrong. I'm receiving an empty string after appending. FileName.h @interface Communicator : NSObject { …
Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
-3
votes
1 answer

NSMutableString init issue

I have an issue with NSMutablestring. When i use it without override my class init method it doesn't work. my interface code: @interface Topic : NSObject @property (strong, nonatomic) NSMutableString *title; @property (strong, nonatomic)…
bspider
  • 28
  • 4
-4
votes
3 answers

How to extract string from string

how to store Height Value separately "6ft 7inch" 6ft in one string and 7inch in another string. 6 and 7 will be dynamically changes ft inch will be constant.
kiran
  • 4,285
  • 7
  • 53
  • 98
-6
votes
2 answers

Class method access by dot operator

This question related to knowing something we don't know. I'm researching with "Why people don't use this"? Is any reason behind this related to specific tech? So read it carefully and give downvote or give correct answer. We can write…
Mani
  • 17,549
  • 13
  • 79
  • 100
-9
votes
1 answer

extract first 3 char to mutable string

NSMutableString *str = [[NSMutableString alloc] init]; [str appendString: @"ab cd efghil mnopq rstuvz"]; //my test [str deleteCharactersInRange:NSMakeRange(2, [str length] -1)]; I would extract the first 3 char.
Mario
  • 17
  • 1
  • 7
-12
votes
5 answers

Generating a list of Strings in Obj C

It seems that Objective C jumps thru hoops to make seemingly simple tasks extremely difficult. I simply need to create a sequence of strings, image1.jpg, image2.jpg, etc etc ie in a loop var imgString:String='image'+i+'.jpg; I assume a best practice…
Bachalo
  • 6,965
  • 27
  • 95
  • 189
1 2 3
20
21