Skip to content

Lưu ý: Đây là bộ tài liệu chưa hoàn thiện, đang trong quá trình cập nhật nên nội dung có thể không đúng hoặc chưa đủ. Nếu phát hiện sai lệch, xin báo lại qua GitHub Issues hoặc gửi Pull Request để sửa.

Hàm xử lý chuỗi UTF-8 ​

Dùng được ở mọi khu vực.

Nguồn: src/includes/utf8/lookup.php, src/includes/utf8/lookup_ar.php, src/includes/utf8/lookup_el.php, src/includes/utf8/lookup_he.php, src/includes/utf8/lookup_ja.php, src/includes/utf8/lookup_ka.php, src/includes/utf8/lookup_ko.php, src/includes/utf8/lookup_ru.php, src/includes/utf8/lookup_sa.php, src/includes/utf8/lookup_th.php, src/includes/utf8/lookup_uk.php, src/includes/utf8/lookup_zh.php, src/includes/utf8/mb_string_handler.php, src/includes/utf8/utf8_functions.php

change_alias ​

php
function change_alias($alias)

Tham số

  • $alias string

Trả về: string|null

Khai báo tại src/includes/utf8/utf8_functions.php:265

change_alias_tags ​

php
function change_alias_tags($alias)

Tham số

  • $alias string

Trả về: string|null

Khai báo tại src/includes/utf8/utf8_functions.php:279

nv_clean60 ​

php
function nv_clean60($string, $num = 60, $specialchars = true)

Tham số

  • $string string
  • $num int, mặc định 60
  • $specialchars bool, mặc định true

Trả về: false|string

Khai báo tại src/includes/utf8/utf8_functions.php:295

nv_EncString ​

php
function nv_EncString($string)

Tham số

  • $string string

Trả về: string

Khai báo tại src/includes/utf8/utf8_functions.php:247

nv_internal_encoding ​

php
function nv_internal_encoding($encoding)

Tham số

  • $encoding string

Trả về: mixed

Khai báo tại src/includes/utf8/mb_string_handler.php:25

nv_ltrim ​

php
function nv_ltrim($str, $charlist = false)

Tham số

  • $str string
  • $charlist bool, mặc định false

Trả về: string|null

Khai báo tại src/includes/utf8/utf8_functions.php:196

nv_rtrim ​

php
function nv_rtrim($str, $charlist = false)

Tham số

  • $str string
  • $charlist bool, mặc định false

Trả về: string|null

Khai báo tại src/includes/utf8/utf8_functions.php:214

nv_str_split ​

php
function nv_str_split($str, $split_len = 1)

Tham số

  • $str string
  • $split_len int, mặc định 1

Trả về: array|false

Khai báo tại src/includes/utf8/utf8_functions.php:126

nv_strlen ​

php
function nv_strlen($string)

Tham số

  • $string string

Trả về: false|int

Khai báo tại src/includes/utf8/mb_string_handler.php:36

nv_strpos ​

php
function nv_strpos($haystack, $needle, $offset = 0)

Tham số

  • $haystack string
  • $needle string
  • $offset int, mặc định 0

Trả về: false|int

Khai báo tại src/includes/utf8/mb_string_handler.php:74

nv_strrpos ​

php
function nv_strrpos($haystack, $needle, $offset = 0)

Tham số

  • $haystack string
  • $needle string
  • $offset int, mặc định 0

Trả về: mixed

Khai báo tại src/includes/utf8/mb_string_handler.php:87

nv_strspn ​

php
function nv_strspn($str, $mask, $start = null, $length = null)

Tham số

  • $str string
  • $mask string
  • $start int|null, mặc định null
  • $length int|null, mặc định null

Trả về: false|int|null

Khai báo tại src/includes/utf8/utf8_functions.php:151

nv_strtolower ​

php
function nv_strtolower($string)

Tham số

  • $string string

Trả về: false|string|null

Khai báo tại src/includes/utf8/mb_string_handler.php:98

nv_strtoupper ​

php
function nv_strtoupper($string)

Tham số

  • $string string

Trả về: false|string|null

Khai báo tại src/includes/utf8/mb_string_handler.php:109

nv_substr ​

php
function nv_substr($string, $start, $length)

Tham số

  • $string string
  • $start int
  • $length int

Trả về: string

Khai báo tại src/includes/utf8/mb_string_handler.php:49

nv_substr_count ​

php
function nv_substr_count($haystack, $needle)

Tham số

  • $haystack string
  • $needle string

Trả về: int

Khai báo tại src/includes/utf8/mb_string_handler.php:61

nv_trim ​

php
function nv_trim($str, $charlist = false)

Tham số

  • $str string
  • $charlist bool, mặc định false

Trả về: string|null

Khai báo tại src/includes/utf8/utf8_functions.php:232

nv_ucfirst ​

php
function nv_ucfirst($str)

Tham số

  • $str string

Trả về: false|string|null

Khai báo tại src/includes/utf8/utf8_functions.php:172

nv_utf8_decode ​

php
function nv_utf8_decode($string)

function thay thế cho utf8_decode đã lỗi thời

Tham số

  • $string string

Trả về: string

Khai báo tại src/includes/utf8/mb_string_handler.php:133

nv_utf8_encode ​

php
function nv_utf8_encode($string)

function thay thế cho utf8_encode đã lỗi thời

Tham số

  • $string string

Trả về: string

Khai báo tại src/includes/utf8/mb_string_handler.php:121

text_split ​

php
function text_split($text, $limit = 200)

Hàm chia đoạn text ra làm 2 phần, phần đầu có số lượng ký tự nhỏ hơn hoặc bằng giá trị $limit. Không tách text ở vị trí giữa từ, mà chỉ ở chỗ có dấu cách

Tham số

  • $text string
  • $limit int, mặc định 200

Trả về: array

Khai báo tại src/includes/utf8/utf8_functions.php:372

unicode_to_entities ​

php
function unicode_to_entities($unicode)

Array ( [0] => 86 [1] => 105 [2] => 7879 [3] => 116 [4] => 32 [5] => 78 [6] => 97 [7] => 109 ) => Việt Nam

Tham số

  • $unicode array

Trả về: string

Khai báo tại src/includes/utf8/utf8_functions.php:63

unicode_to_entities_preserving_ascii ​

php
function unicode_to_entities_preserving_ascii($unicode)

Array ( [0] => 86 [1] => 105 [2] => 7879 [3] => 116 [4] => 32 [5] => 78 [6] => 97 [7] => 109 ) => Việt Nam

Tham số

  • $unicode array

Trả về: string

Khai báo tại src/includes/utf8/utf8_functions.php:81

unicode_to_utf8 ​

php
function unicode_to_utf8($str)

Array ( [0] => 86 [1] => 105 [2] => 7879 [3] => 116 [4] => 32 [5] => 78 [6] => 97 [7] => 109 ) => Vie^.t Nam

Tham số

  • $str array

Trả về: string

Khai báo tại src/includes/utf8/utf8_functions.php:99

utf8_to_unicode ​

php
function utf8_to_unicode($str)

Vie^.t Nam => Array ([0] => 86 [1] => 105 [2] => 7879 [3] => 116 [4] => 32 [5] => 78 [6] => 97 [7] => 109)

Tham số

  • $str mixed

Trả về: array

Khai báo tại src/includes/utf8/utf8_functions.php:23