funcstringFormatToThreeBit(str:String) ->String{
ifstr.characters.count<=0{
return""
}
lettempRemoveD = str.replacingOccurrences(of:",", with:"")asNSString
letstrM =NSMutableString.init(string: tempRemoveD)
varn =2
foriin((0+1)...tempRemoveD.length-3).reversed(){
n +=1
ifn ==3{
strM.insert(",", at: i)
n =0
}
}
returnstrMasString
}
网友评论