将
for
循环中手动递增的索引变量替换为使用
withIndex()
函数。