// 替换空格 // 题目:请实现一个函数,把字符串中的每个空格替换成"%20"。例如输入“We are happy.”, // 则输出“We%20are%20happy.”。 #include <iostream> using namespace std; bool replace_space(char* str,const int length) { if (str == NULL && length <= 0)//上来先判断 return false; int true_length = 0, count = 0, i = 0; while (str[i] != '