换种
swift4字符串截取
swift4字符串截取截取某字符串的前10个字符串let sub1 = str.prefix(10)截取某字符串的后10个字符串let str1 = str.suffix(10)也可以换种写法let index2 = str.dIndex, offsetBy: -10)let sub4 = str[index2..&dIndex]截取某字符串的第3个字符到...
js多维数组长度_js多维数组
js多维数组长度_js多维数组⽅法⼀:直接定义并且初始化,这种遇到数量少的情况可以⽤var _TheArray = [["0-1","0-2"],["1-1","1-2"],["2-1","2-2"]]⽅法⼆:未知长度的⼆维数组var tArray = new Array(); //先声明⼀维for(var k=0;ktArray[k]=new Array(); &nbs...