gpt4 book ai didi

swift - 如何删除 Swift 4 中字符串的最后一个字符?

转载 作者:搜寻专家 更新时间:2023-10-30 22:01:20 24 4
gpt4 key购买 nike

<分区>

如何在 Swift 4 中删除字符串的最后一个字符?我曾经在早期版本的 Swift 中使用 substring,但 substring 方法已被弃用。

这是我的代码。

temp = temp.substring(to: temp.index(before: temp.endIndex))

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com