回答編集履歴

2

余分な変数削除

2016/03/11 11:08

投稿

bensky
bensky

スコア94

test CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  {
22
22
 
23
- return $str = preg_replace('/(\s| )/', '' ,$str);
23
+ return preg_replace('/(\s| )/', '' ,$str);
24
24
 
25
25
  }
26
26
 
@@ -30,7 +30,7 @@
30
30
 
31
31
  {
32
32
 
33
- return $str = preg_replace('/(\n|\r|\r\n)/', '' ,$str);
33
+ return preg_replace('/(\n|\r|\r\n)/', '' ,$str);
34
34
 
35
35
  }
36
36
 

1

サンプルコード誤り

2016/03/11 11:08

投稿

bensky
bensky

スコア94

test CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  {
18
18
 
19
- static public function deleteSpace($str)
19
+ public static function deleteSpace($str)
20
20
 
21
21
  {
22
22
 
@@ -26,7 +26,7 @@
26
26
 
27
27
 
28
28
 
29
- static public function deleteLineBreak($str)
29
+ public static function deleteLineBreak($str)
30
30
 
31
31
  {
32
32