标签:string 试题 ret turn for style -- 面试 etc
链接:https://leetcode-cn.com/problems/ti-huan-kong-ge-lcof/
class Solution { public: string replaceSpace(string s) { string res; for (auto x: s) { if (x == ‘ ‘) res += "%20"; else res += x; } return res; } };
标签:string 试题 ret turn for style -- 面试 etc
原文地址:https://www.cnblogs.com/clown9804/p/12312829.html