Swift获取值的类型
xxxixxxx

使用 type(of:) 函数

1
2
3
4
5

let a = type(of:"😄")

print(a) //String

直达文档

  • Post title:Swift获取值的类型
  • Post author:xxxixxxx
  • Create time:2020-11-19 00:00:00
  • Post link:https://xxxixxx.github.io/2020/11/19/100-Swift获取值的类型/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.
 Comments