c#의 StartsWith, EndsWith 함수 정보
PHP c#의 StartsWith, EndsWith 함수
본문
function startsWith($haystack, $needle) {
$length = strlen($needle);
return substr($haystack, 0, $length) === $needle;
}
function endsWith($haystack, $needle) {
$length = strlen($needle);
if ($length == 0)
return true;
return substr($haystack, -$length) === $needle;
}
추천
0
0
댓글 0개