In a Objective-C application that I am developing, I need to parse byte count strings to obtain the number of bytes represented by the string. For example, if I have "10 MB" as a String, I would like to parse it to have the number of bytes, which, in this case is 10485760 bytes. NSDateFormatter and NSNumberFormatter can convert in both directions, while I don't find a byteCountFromString: method in NSByteCountFormatter. I have searched if some NSFormatter methods can solve the problem, but I have not found the solution so far. Any help is greatly appreciated. Thanks.
Is there anything similar for NSByteCountFormatter?
No. NSByteCountFormatter
converts a byte count value into a localized description that is formatted with the appropriate byte modifier (KB, MB, GB and so on). Not the other way around.