- 注册时间
- 2013-9-23
- 在线时间
- 519 小时
- 最后登录
- 2022-4-4
- 阅读权限
- 200
管理员
MT4软件工程师
- 积分
- 6521
- 帖子
- 2771
- 主题
- 2761
|
MT4智能交易编程教程-StringReplace函数
- int StringReplace(
- string& str, // the string in which substrings will be replaced
- const string find, // the searched substring
- const string replacement // the substring that will be inserted to the found positions
- );
复制代码
示例:
- string text="The quick brown fox jumped over the lazy dog.";
- int replaced=StringReplace(text,"quick","slow");
- replaced+=StringReplace(text,"brown","black");
- replaced+=StringReplace(text,"fox","bear");
- Print("Replaced: ", replaced,". Result=",text);
-
- // Result
- // Replaced: 3. Result=The slow black bear jumped over the lazy dog.
- //
复制代码
|
|