从转换为字符串的数组值中删除括号
Remove parentheses from array value converted to string
我有一个文本视图,当显示文本时,文本中有括号。我想消灭他们。这是我的代码:
self.txtpstn.text = "\(self.no_pstn.self as NSArray)"
self.txtmobile.text = "\(self.no_mobile.self as NSArray)"
这是应用程序上的显示:
使用连接:
self.txtpstn.text = "\((self.no_pstn.self as NSArray).componentsJoined(by: ","))"
self.txtmobile.text = "\(self.no_mobile.self as NSArray).componentsJoined(by: ","))"
我有一个文本视图,当显示文本时,文本中有括号。我想消灭他们。这是我的代码:
self.txtpstn.text = "\(self.no_pstn.self as NSArray)"
self.txtmobile.text = "\(self.no_mobile.self as NSArray)"
这是应用程序上的显示:
使用连接:
self.txtpstn.text = "\((self.no_pstn.self as NSArray).componentsJoined(by: ","))"
self.txtmobile.text = "\(self.no_mobile.self as NSArray).componentsJoined(by: ","))"