Ola Folks,
I want to populate an NSMutableString at runtime by both assigning a specific number (0-255) to an element and appendFormat to add to the string.
If this were an unsigned char array, I could just directly assign the number using:
UnsignedCharRay[SomeIndex] = 5;
For reasons I think I understand but do not like,
NSMutableStringObject[SomeIndex] = 5;
will not work.
As far as I can tell, there are no NSString or NSMutableString methods to directly set an element of the string array.
Is there a way to do this? If so, what is it?
Until I find an answer and can do this with NSMutableString, I am going to use an unsigned char array and create an NSString using the unsigned char araay. Aside from specifying NSUTF8StringEncoding when I create the NSString, are there other considerations I should pay attention to? What is the most effective method of creating an NSString from an unsigned char array? The goal is to retain the values of 0 to 255 during the conversion. Note: 0 would only appear at the end of the string ... sometimes.
TIA
-isdi-