回答編集履歴
2
余分な変数削除
test
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
{
|
22
22
|
|
23
|
-
return
|
23
|
+
return preg_replace('/(\s| )/', '' ,$str);
|
24
24
|
|
25
25
|
}
|
26
26
|
|
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
{
|
32
32
|
|
33
|
-
return
|
33
|
+
return preg_replace('/(\n|\r|\r\n)/', '' ,$str);
|
34
34
|
|
35
35
|
}
|
36
36
|
|
1
サンプルコード誤り
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
{
|
18
18
|
|
19
|
-
static
|
19
|
+
public static function deleteSpace($str)
|
20
20
|
|
21
21
|
{
|
22
22
|
|
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
static
|
29
|
+
public static function deleteLineBreak($str)
|
30
30
|
|
31
31
|
{
|
32
32
|
|