Given an array of characters, compress it in-place. The length after compression must always be smaller than or equal to the original array. Every element of the array should be a character (not int) of length 1. After you are done modifying the inpu…
string常用的一些操作方式 //字符串 //1.初始化字符串 //1.1通过字面量赋值的方式初始化字符串 let tempStrig = "this is temp string" let tempStrig = "this is TEMP string" //字母大小写 print(tempStrig.uppercased()) print(tempStrig.lowercased()) //1.2通过创建String实例化的方法初始化字符串 let anou…