Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何删除另一个字符串中所有出现的字符串?我可以使用以下代码执行此操作:
std.array.replace: "the string".replace("the", "")
但我想知道在火卫一中是否有专门的功能?
是的。是正确的功能。但您可能想从std.string. 因为如果在将来的版本中发生变化,您仍然可以使用正确的功能。
std.string
从文档std.string:
以下函数是公开导入的: std.array: ...replace replaceInPlace
以下函数是公开导入的:
std.array: ...replace replaceInPlace
std.array
replace
replaceInPlace