資源簡介
使用c++寫的字符串替換函數(shù),可以完成字符串的替換功能
代碼片段和文件信息
#include?
#include?
using?namespace?std;
void?replace(string&?s?const?string&?oldVal?const?string&?newVal)
{
string::size_type?pos?=?0;
unsigned?cnt?=?0;
while?(pos?!=?string::npos)
{
pos?=?s.find(oldVal?pos);
if?(?pos
- 上一篇:編譯原理 壓縮文法等價變換
- 下一篇:GE OPC Server
評論
共有 條評論