PHP mod_korean extension Reference
  • Introduction
  • Installation
  • APIs
    • Check Functions
      • check_filename_lib
      • check_htmltbale_lib
      • check_uristr_lib
      • get_microtime_lib
      • human_fsize_lib
      • is_email_lib
      • is_hangul_lib
      • is_iis_lib
      • is_url_lib
      • is_windows_lib
      • buildno_lib
      • version_lib
    • Filesystem Functions
      • filelist_lib
      • getfile_lib
      • getfiletype_lib
      • putfile_lib
      • readfile_lib
      • pcregrep_lib
    • HTML Functions
      • agentinfo_lib
      • autolink_lib
      • get_hostname_lib
      • movepage_lib
      • perror_lib
      • pnotice_lib
    • Charset Functions
      • ncrencode_lib
      • ncrdecode_lib
      • uniencode_lib
      • unidecode_lib
      • utf8encode_lib
      • utf8decode_lib
      • substr_lib
      • postposition_lib
    • Image Functions
      • imgresize_lib
    • Mail Functions
      • mailsource_lib
      • sockmail_lib
Powered by GitBook
On this page
  • Proto type
  • Description
  • Arguments
  • Example
  • See also

Was this helpful?

  1. APIs
  2. Check Functions

is_hangul_lib

Previousis_email_libNextis_iis_lib

Last updated 5 years ago

Was this helpful?

Proto type

int is_hangul_lib (string string)

Description

이 함수에 들어온 문자 또는 문자열의 첫바이트가 한글의 범위 내 (0xA1A1 - 0xFEFE) 에 들어 있는 문자가 존재 하는지를 테스트하여 존재하면 1을 반환한다. 없으면 0을 반환한다.

이 함수에서 체크하는 한글의 범위라는 것은 EUC-KR 또는 CP949를 의미하여, 정확하게 한글 영역을 의미하는 것은 아니다. 이 함수는 부정확성이 높기 때문에 사용을 권장하지 않는다.

한글 관련하여 정확한 체크를 원한다면, pear package를 사용하는 것을 권장 한다.

Arguments

  • (string) string - 검사할 문자 또는 문자열.

Example

<?php
$str = "abcde한fg";

for ($i=0; $i<strlen($str); $i++ ) {
    if ( is_hangul_lib ($str[$i]) ) {
      $hangul_exists = 1;
    }
}
?>

See also

None

KSC5601