将NSTaggedPointerString转换为NSString [英] convert NSTaggedPointerString to NSString
问题描述
我调用了百度的一个接口来检查id号,但是当我在模块中使用NSString
进行存储时,在JSON中的M
周围返回的sex = M
的Sex值不带"打印此sex
属性的类名称,将其打印为NSTaggedPointerString
,我怀疑如何将其转换为String以使用它.有人有好主意吗?
I had called an interface of Baidu to check id Number, however the value of Sex returned with sex = M
, without "" around the M
in JSON, when I use NSString
in module to store it and then print the class name of this sex
property, it printed as NSTaggedPointerString
, I doubt how to convert it to a String to use it. Anyone have good ideas?
推荐答案
NSTaggedPointerString
已经是NSString
,它只是一个子类.您可以在任何可以使用NSString
的地方使用它,而无需进行转换.
NSTaggedPointerString
is already an NSString
, it's just a subclass. You can use it anywhere you can use an NSString
, without conversion.
这篇关于将NSTaggedPointerString转换为NSString的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!