NSString *test = @"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
How to convert this string to bytes?
NSData *bytes = [test dataUsingEncoding:NSUTF8StringEncoding];
Do you want something like this:
NSString *test=@"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
NSUInteger bytes = [test lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"%i bytes", bytes);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With