Questions tagged [unichar]
29 questions
10
votes
2 answers
Converting NSString to unichar in iOS
I have seen questions in stackoverflow that convert unichar to NSString but now I would like to do the reverse.
How do i do it?
Need some guidance.. Thanks
For example, I have an array of strings:[@"o",@"p",@"q"];
These are strings inside. How do i…

lakshmen
- 28,346
- 66
- 178
- 276
8
votes
1 answer
Appending unichar to NSMutableString
How do you append a unichar character to NSMutableString?
unichar c = 'T';
NSMutableString *s = [NSMutableString stringWithString:@"MyString"];
// want s to become "MyStringT"
https://discussions.apple.com/thread/1679290 suggests:
[s…

mllm
- 17,068
- 15
- 53
- 64
7
votes
1 answer
Converting Unichar to Int Problem
I've got a strange problem trying to convert from unichar to int:
I have a String containing a few numbers, like @"12345". This numbers I want to save individually, meaning I want 5 numbers, 1, 2, 3, ... . Now, while
NSLog(@"Value: %C", [myString…

fabian789
- 8,348
- 4
- 45
- 91
5
votes
1 answer
Objective C ==> unichar[] to NSString?
I have an array of unichars i need to convert it to nsstring.
How can i do this?

aryaxt
- 76,198
- 92
- 293
- 442
4
votes
4 answers
How do I split a string with special characters into a NSMutableArray
I'am trying to seperate a string with danish characters into a NSMutableArray. But something is not working. :(
My code:
NSString *danishString = @"æøå";
NSMutableArray *characters = [[NSMutableArray alloc] initWithCapacity:[danishString length]];…

Morten Gustafsson
- 1,869
- 2
- 24
- 34
4
votes
2 answers
Append String with unichar
I got some weird issue here. The code is as below
NSMutableString *unicodeString = [NSMutableString string];
for (NSUInteger i = 0; i < [data length]; i++) {
unsigned char byte;
[data getBytes:&byte range:NSMakeRange(i, 1)];
unichar…

Lunayo
- 538
- 7
- 32
4
votes
2 answers
objective-c - difference between char and unichar?
I searched a lot about the difference of unichar and char but did't get any clear concept.
also tell me difference about char[] and unichar[].
when use char and unichar ??

Hitesh Agarwal
- 1,943
- 17
- 21
3
votes
1 answer
unichar comparision in objective c
I need to implement a method, which compares two strings for equality, considering some turkish letters as latin(e.g. ı = i). That's bottleneck in program, so it needs to be implemented as efficient as possible.
I can't use NSString compare:…

Rustam Ganeyev
- 894
- 2
- 12
- 29
3
votes
3 answers
Convert or Print CGPDFStringRef string
How to convert a CGPDFStringRef to unicode char? I have used CGPDFStringCopyTextString to get the string and then [string characterAtIndex:i] to cast to unichar, is this the right way? or is there any way to get the bytes of the string and convert…

Lunayo
- 538
- 7
- 32
2
votes
2 answers
is it possible to convert NSString into unichar
I have a NSString object and want to change it into unichar.
int decimal = [[temp substringFromIndex:2] intValue]; // decimal = 12298
NSString *hex = [NSString stringWithFormat:@"0x%x", decimal]; // hex = 0x300a
NSString *chineseChar = [NSString…

SandeepM
- 2,601
- 1
- 22
- 32
2
votes
1 answer
Formatting Characters
I have an application (IM Client) that I wish to setup custom formatting symbols in similar to mIRC rather than relying on rich text. I will accomplish this by pairing a UniChar 003 with a number 0-15 to process colors and other characters for…

Omni
- 21
- 1
2
votes
2 answers
Using binary operator with unichar and String
I am attempting to use a binary operator to compare two values:
character = (xxx as NSString).characterAtIndex(2)
if character == "1" {
//do this thingy
}
Now I receive the failure message Binary Operator '==' cannot be applied to operands…

Pete
- 613
- 1
- 6
- 18
2
votes
1 answer
char, wchar_t and unichar
I'm writing my first ever Objective-C/Cocoa program. (I already know C and C++ in the Windows world, i.e. Visual C++.) It looks like Cocoa can work with the char type, but prefers the unichar type. It also looks like Cocoa does NOT much care for…

HairOfTheDog
- 2,489
- 2
- 29
- 35
1
vote
1 answer
Apostrophe Unichar Comparison Problems
I am currently looking at parts of a string like this ;
if (thisChar == 'a')
[self a];
else if (thisChar == 'b')
[self b];
else if (thisChar == 'c')
[self c];
.........
else…

Jonathan King
- 1,528
- 14
- 25
1
vote
1 answer
Question mark in place of font icon for some font codes
I have custom font icon TTF file downloaded to the device. I also have mappings for font icon name and its font code.
A question mark is being displayed instead of font icon for some of the font code. The font code points are received from server in…

dev gr
- 2,409
- 1
- 21
- 33