mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-11 02:58:13 +08:00
15 lines
384 B
HTML
15 lines
384 B
HTML
<p>请实现一个函数,把字符串 <code>s</code> 中的每个空格替换成"%20"。</p>
|
||
|
||
<p> </p>
|
||
|
||
<p><strong>示例 1:</strong></p>
|
||
|
||
<pre><strong>输入:</strong>s = "We are happy."
|
||
<strong>输出:</strong>"We%20are%20happy."</pre>
|
||
|
||
<p> </p>
|
||
|
||
<p><strong>限制:</strong></p>
|
||
|
||
<p><code>0 <= s 的长度 <= 10000</code></p>
|