截取字符串
let deviceStr = deviceInfoLabel.attributedText?.string
var device = ""
if let len : Range<String.Index> = deviceStr?.range(of: "#"){
let range :Range<String.Index> = (deviceStr?.startIndex)! ..< len.lowerBound
device = String(deviceStr![range]) + "#"
}