iconv_substr

(PHP 5, PHP 7)

iconv_substr锟斤拷取锟街凤拷锟斤拷锟侥诧拷锟斤拷

说锟斤拷

iconv_substr ( string $str , int $offset [, int $length = iconv_strlen($str, $charset) [, string $charset = ini_get("iconv.internal_encoding") ]] ) : string

锟斤拷锟斤拷 offset 锟斤拷 length 锟斤拷锟斤拷指锟斤拷 str 锟斤拷取锟侥诧拷锟街★拷

锟斤拷锟斤拷

str

原始锟街凤拷锟斤拷锟斤拷

offset

锟斤拷锟� offset 锟角非革拷锟斤拷锟斤拷iconv_substr() 锟斤拷 str 锟斤拷头锟斤拷 offset 锟斤拷锟街凤拷锟斤拷始锟截筹拷锟斤拷锟街o拷锟斤拷 0 锟斤拷始锟斤拷锟斤拷锟斤拷

锟斤拷锟� offset 锟角革拷锟斤拷锟斤拷iconv_substr() 锟斤拷 str 末尾锟斤拷前 offset 锟斤拷锟街凤拷锟斤拷始锟斤拷取锟斤拷

length

锟斤拷锟街革拷锟斤拷锟� length 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟截碉拷值锟斤拷 offset 锟斤拷取锟斤拷锟街o拷锟斤拷锟斤拷锟斤拷 length 锟斤拷锟街凤拷锟斤拷取锟斤拷锟斤拷 string 锟侥筹拷锟饺o拷锟斤拷

锟斤拷锟斤拷锟斤拷锟斤拷烁锟斤拷锟斤拷锟� length锟斤拷 iconv_substr() 锟斤拷锟接碉拷 offset 锟斤拷锟街凤拷锟斤拷锟斤拷末尾 length 锟斤拷锟街凤拷锟截筹拷 str 锟侥诧拷锟街★拷 锟斤拷锟� offset 也锟角革拷锟斤拷锟斤拷锟斤拷始位锟矫硷拷锟斤拷锟斤拷锟侥斤拷锟酵硷拷锟斤拷锟较★拷

charset

锟斤拷锟绞★拷锟斤拷瞬锟斤拷锟� charset锟斤拷string 锟侥憋拷锟诫被锟较讹拷为 iconv.internal_encoding锟斤拷

注锟解,offset 锟斤拷 length 锟斤拷锟斤拷锟斤拷锟角憋拷锟斤拷为锟街凤拷锟斤拷锟街碉拷偏锟狡o拷锟斤拷锟斤拷 charset 锟斤拷獾斤拷锟斤拷址锟斤拷锟斤拷锟斤拷锟酵筹拷萍锟斤拷悖拷锟斤拷锟斤拷应锟斤拷 substr() 锟斤拷锟角伙拷锟斤拷锟街节碉拷位锟斤拷锟斤拷锟斤拷锟姐。

锟斤拷锟斤拷值

锟斤拷锟斤拷 offset 锟斤拷 length 锟斤拷锟斤拷指锟斤拷锟斤拷 str 锟侥诧拷锟街★拷

锟斤拷锟� str 锟斤拷 offset 锟街凤拷锟斤拷锟斤拷锟教o拷锟斤拷锟结返锟斤拷 FALSE锟斤拷 锟斤拷锟� str 锟斤拷 offset 锟斤拷锟街凤拷锟侥筹拷锟饺o拷锟斤拷锟斤拷锟截匡拷锟街凤拷锟斤拷锟斤拷

锟斤拷锟斤拷锟斤拷志

锟芥本 说锟斤拷
7.0.11 锟斤拷锟� str 锟饺筹拷锟斤拷 offset 锟斤拷锟街凤拷锟斤拷 锟斤拷锟斤拷锟截匡拷锟街凤拷锟斤拷锟斤拷之前锟侥版本锟斤,锟斤拷锟斤拷锟斤拷锟斤拷腔岱碉拷锟� FALSE 锟侥★拷

锟轿硷拷

  • substr() - 锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷锟接达拷
  • mb_substr() - 锟斤拷取锟斤拷锟斤拷锟街凤拷锟斤拷
  • mb_strcut() - 锟斤拷取锟街凤拷锟斤拷一锟斤拷锟斤拷