Reputation: 3
I have written a code like this :
NSString *Input = @"1";
NSMutableData *InputData = [Input dataUsingEncoding:NSASCIIStringEncoding];
I expected that the InputData be 48 , but it was 31 . Did I do something wrong ?
Upvotes: 0
Views: 90
Reputation: 551
(Added as response by request)
In ASCII '1' is 49, not 48, which is 0x31. Are you maybe confusing them?
Upvotes: 2