PHP 클래스 CI_Utf8, TastyIgniter

Provides support for UTF-8 environments
저자: EllisLab Dev Team
파일 보기 프로젝트 열기: tastyigniter/tastyigniter 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( ) : void Class constructor
clean_string ( string $str ) : string Clean UTF-8 strings
convert_to_utf8 ( string $str, string $encoding ) : string Convert to UTF-8
is_ascii ( string $str ) : boolean Is ASCII?
safe_ascii_for_xml ( string $str ) : string Remove ASCII control characters

메소드 상세

__construct() 공개 메소드

Determines if UTF-8 support is to be enabled.
public __construct ( ) : void
리턴 void

clean_string() 공개 메소드

Ensures strings contain only valid UTF-8 characters.
public clean_string ( string $str ) : string
$str string String to clean
리턴 string

convert_to_utf8() 공개 메소드

Attempts to convert a string to UTF-8.
public convert_to_utf8 ( string $str, string $encoding ) : string
$str string Input string
$encoding string Input encoding
리턴 string $str encoded in UTF-8 or FALSE on failure

is_ascii() 공개 메소드

Tests if a string is standard 7-bit ASCII or not.
public is_ascii ( string $str ) : boolean
$str string String to check
리턴 boolean

safe_ascii_for_xml() 공개 메소드

Removes all ASCII control characters except horizontal tabs, line feeds, and carriage returns, as all others can cause problems in XML.
public safe_ascii_for_xml ( string $str ) : string
$str string String to clean
리턴 string