Offer05.替换空格/Solution.java
<reponame>codeSu97/SwordToOfferclass Solution {
    public String replaceSpace(String s) {
        StringBuilder stringBuildr = new StringBuilder();
        char[] sc = s.toCharArray();
        for (char c : sc) {
            if (' ' == c) {
                stringBuildr.append("%20");
            } else {
                stringBuildr.append(c);
            }
        }
        return stringBuildr.toString();
    }
}