将NSTaggedPointerString转换为NSString [英] convert NSTaggedPointerString to NSString

查看:422
本文介绍了将NSTaggedPointerString转换为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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆