We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d0fc46 commit cd6fd0bCopy full SHA for cd6fd0b
lcof/面试题05. 替换空格/README.md
@@ -218,6 +218,25 @@ public class Solution {
218
}
219
```
220
221
+### **PHP**
222
+
223
+```php
224
+class Solution {
225
+ /**
226
+ * @param String $s
227
+ * @return String
228
+ */
229
+ function replaceSpace($s) {
230
+ $rs = "";
231
+ for ($i = 0; $i < strlen($s); $i++) {
232
+ if ($s[$i] === " ") $rs = $rs."%20";
233
+ else $rs = $rs.$s[$i];
234
+ }
235
+ return $rs;
236
237
+}
238
+```
239
240
### **...**
241
242
lcof/面试题05. 替换空格/Solution.php
@@ -0,0 +1,14 @@
1
2
3
4
5
6
7
8
9
10
11
12
13
14
0 commit comments