如何删除另一个字符串中出现的所有字符串?我可以使用以下代码执行此操作:
std.array.replace: "the string".replace("the", "")
Run Code Online (Sandbox Code Playgroud)
但我想知道在phobos中是否有专门的功能?
是.这是正确的功能.但是你可能想要使用它std.string.因为如果将来某些版本发生变化,您仍将使用正确的功能.
来自以下文件std.string:
以下功能是公开导入的:
std.array:...replacereplaceInPlace
| 归档时间: |
|
| 查看次数: |
129 次 |
| 最近记录: |