Are there any methods in objective C for converting byte to int, float and NSString?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The first are C-types. No conversion is needed, just assign them:
Converting to NSString could be done using
stringWithFormat:, aNSNumberFormatterand many more methods. This is the easiest:If you want it printed in hex, use
@"%x"(for lowercase letters) or@"%X"(for capital letters) instead.