문자열 자르는 함수.. (뒷북 가능성 높음.. -_-)

· 19년 전 · 2421
mb_strimwidth
(PHP 4 >= 4.0.6, PHP 5)
mb_strimwidth -- Get truncated string with specified width

Description
string mb_strimwidth ( string str, int start, int width, string trimmarker [, string encoding])


mb_strimwidth() truncates string str to specified width. It returns truncated string.
If trimmarker is set, trimmarker is appended to return value.
start is start position offset. Number of characters from the beginning of string. (First character is 0)
trimmarker is string that is added to the end of string when string is truncated.
encoding is character encoding. If it is omitted, internal encoding is used.


================================================================
mb_strimwidth 함수 입니다..
멀티바이트 스트링 함수들이 굉장히 많더군요..

문자열좀 이쁘게 자르려고 안간힘 쓰다가 발견하고 그냥 이 함수 쓰기로 했습니다..
한줄이면 끝난다는 엄청난 잇점도 있고..
글자의 폭이 같은 폰트를 쓸 경우는 길이가 다듬지 않아도 거의 균일합니다..


ps. 멀티바이트 스트링 관련 함수들이 굉장히 많던데 성능면에서 효율적인지가 궁금합니다..
잘 아시는분 있으면 알려주세요.. ^^;;



http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=46975&sca=%C7%D4%BC%F6<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:12:10 PHP & HTML에서 이동 됨]</div>
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

프로그램

+
제목 글쓴이 날짜 조회
19년 전 조회 4,293
19년 전 조회 3,265
19년 전 조회 4,130
19년 전 조회 1,993
19년 전 조회 2,208
19년 전 조회 2,137
19년 전 조회 3,343
19년 전 조회 2,714
19년 전 조회 3,504
19년 전 조회 2,677
19년 전 조회 2,516
19년 전 조회 2,339
19년 전 조회 2,230
19년 전 조회 2,121
19년 전 조회 4,249
19년 전 조회 2,669
19년 전 조회 2,156
19년 전 조회 2,254
19년 전 조회 2,837
19년 전 조회 1,954
19년 전 조회 3,193
19년 전 조회 2,752
19년 전 조회 2,262
19년 전 조회 1,807
19년 전 조회 2,230
19년 전 조회 2,000
19년 전 조회 1,899
19년 전 조회 2,460
19년 전 조회 2,314
19년 전 조회 3,880
19년 전 조회 3,734
19년 전 조회 2,235
19년 전 조회 3,279
19년 전 조회 1,949
19년 전 조회 2,377
19년 전 조회 2,269
19년 전 조회 2,339
19년 전 조회 2,173
19년 전 조회 2,806
19년 전 조회 2,817
19년 전 조회 3,165
19년 전 조회 3,033
19년 전 조회 2,702
19년 전 조회 2,920
19년 전 조회 3,170
19년 전 조회 2,870
19년 전 조회 2,606
19년 전 조회 2,918
19년 전 조회 4,497
19년 전 조회 2,422
19년 전 조회 2,442
19년 전 조회 3,478
19년 전 조회 3,149
19년 전 조회 2,801
19년 전 조회 2,043
19년 전 조회 1,770
19년 전 조회 2,873
19년 전 조회 1,718
19년 전 조회 2,309
19년 전 조회 3,949
19년 전 조회 3,727
19년 전 조회 3,447
19년 전 조회 3,400
19년 전 조회 1,560
19년 전 조회 1,929
19년 전 조회 1,851
19년 전 조회 2,518
19년 전 조회 4,614
19년 전 조회 2,750
19년 전 조회 1,915
19년 전 조회 1,923
19년 전 조회 1,812
19년 전 조회 2,552
19년 전 조회 8,172
19년 전 조회 2,720
19년 전 조회 2,785
19년 전 조회 3,037
19년 전 조회 2,193
19년 전 조회 2,207
19년 전 조회 2,171
19년 전 조회 2,064
19년 전 조회 2,254
19년 전 조회 2,511
19년 전 조회 3,076
19년 전 조회 2,328
19년 전 조회 1,903
19년 전 조회 2,828
19년 전 조회 4,994
19년 전 조회 3,492
19년 전 조회 3,450
19년 전 조회 2,971
19년 전 조회 2,394
19년 전 조회 1,484
19년 전 조회 3,131
19년 전 조회 2,006
19년 전 조회 5,368
19년 전 조회 2,426
19년 전 조회 3,427
19년 전 조회 2,851
19년 전 조회 1,759
🐛 버그신고