Swift中String在指定位置插入字符串

api:

str.index(<#T##i: String.Index##String.Index#>, offsetBy: <#T##String.IndexDistance#>)

大致说明一下

str.endIndex 从什么位置开始

offsetBy:偏移多少位,呃..±就代表方向了

 

每天进步一点点,祭奠我虚度的光阴!

猜你喜欢

转载自www.cnblogs.com/bgj9308/p/11506509.html