文档
注册

StringReplaceAll

函数功能

将字符串str中包含old_value的字符串用new_value替换。

函数原型

数据类型为string的接口后续版本会废弃,建议使用数据类型为非string的接口。

static std::string StringReplaceAll(std::string str, const std::string &old_value, const std::string &new_value);

static AscendString StringReplaceAll(const char *str, const char *old_value, const char *new_value);

参数说明

参数名

输入/输出

描述

str

输入

待处理的源字符串

old_value

输入

待替换的字符串

new_value

输入

用来替换old_value的字符串

返回值

参数名

描述

-

替换后的新字符串

约束说明

无。

搜索结果
找到“0”个结果

当前产品无相关内容

未找到相关内容,请尝试其他搜索词