标签:png ret stringbu pen com nbsp alt tco end
题目描述:
方法一:java
class Solution { public String replaceSpace(String s) { StringBuilder res = new StringBuilder(); for(Character c: s.toCharArray()){ if(c == ‘ ‘) res.append("%20"); else res.append(c); } return res.toString(); } }
标签:png ret stringbu pen com nbsp alt tco end
原文地址:https://www.cnblogs.com/oldby/p/12620931.html