"카타 8급 Remove String Spaces"의 두 판 사이의 차이

(새 문서: ==개요== {{카타 헤더}} {{카타 8급-1}} |})
 
3번째 줄: 3번째 줄:
{{카타 8급-1}}
{{카타 8급-1}}
|}
|}
==PHP==
<source lang='php'>
function no_space(string $s): string {
  return str_replace(' ','',$s);
}
</source>
<source lang='php'>
function no_space(string $s): string {
  return preg_replace("/\s/", "", $s);
}
</source>

2019년 1월 27일 (일) 15:04 판

1 개요

카타 8급 C
# 🔗 문제 풀이

틀:카타 8급-1

2 PHP

function no_space(string $s): string {
  return str_replace(' ','',$s);
}
function no_space(string $s): string {
  return preg_replace("/\s/", "", $s);
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}