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

· 19년 전 · 2419
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,290
19년 전 조회 3,262
19년 전 조회 4,127
19년 전 조회 1,990
19년 전 조회 2,205
19년 전 조회 2,133
19년 전 조회 3,338
19년 전 조회 2,710
19년 전 조회 3,499
19년 전 조회 2,673
19년 전 조회 2,513
19년 전 조회 2,334
19년 전 조회 2,228
19년 전 조회 2,118
19년 전 조회 4,244
19년 전 조회 2,666
19년 전 조회 2,154
19년 전 조회 2,252
19년 전 조회 2,835
19년 전 조회 1,950
19년 전 조회 3,192
19년 전 조회 2,749
19년 전 조회 2,258
19년 전 조회 1,803
19년 전 조회 2,228
19년 전 조회 1,999
19년 전 조회 1,894
19년 전 조회 2,456
19년 전 조회 2,312
19년 전 조회 3,877
19년 전 조회 3,732
19년 전 조회 2,232
19년 전 조회 3,275
19년 전 조회 1,948
19년 전 조회 2,374
19년 전 조회 2,267
19년 전 조회 2,335
19년 전 조회 2,170
19년 전 조회 2,804
19년 전 조회 2,812
19년 전 조회 3,160
19년 전 조회 3,030
19년 전 조회 2,700
19년 전 조회 2,918
19년 전 조회 3,167
19년 전 조회 2,868
19년 전 조회 2,605
19년 전 조회 2,915
19년 전 조회 4,495
19년 전 조회 2,420
19년 전 조회 2,438
19년 전 조회 3,475
19년 전 조회 3,146
19년 전 조회 2,798
19년 전 조회 2,041
19년 전 조회 1,766
19년 전 조회 2,871
19년 전 조회 1,714
19년 전 조회 2,305
19년 전 조회 3,946
19년 전 조회 3,725
19년 전 조회 3,445
19년 전 조회 3,398
19년 전 조회 1,558
19년 전 조회 1,926
19년 전 조회 1,849
19년 전 조회 2,515
19년 전 조회 4,611
19년 전 조회 2,748
19년 전 조회 1,913
19년 전 조회 1,921
19년 전 조회 1,808
19년 전 조회 2,549
19년 전 조회 8,170
19년 전 조회 2,718
19년 전 조회 2,783
19년 전 조회 3,035
19년 전 조회 2,190
19년 전 조회 2,205
19년 전 조회 2,168
19년 전 조회 2,063
19년 전 조회 2,252
19년 전 조회 2,509
19년 전 조회 3,074
19년 전 조회 2,325
19년 전 조회 1,901
19년 전 조회 2,825
19년 전 조회 4,991
19년 전 조회 3,490
19년 전 조회 3,448
19년 전 조회 2,969
19년 전 조회 2,391
19년 전 조회 1,480
19년 전 조회 3,129
19년 전 조회 2,003
19년 전 조회 5,365
19년 전 조회 2,420
19년 전 조회 3,423
19년 전 조회 2,848
19년 전 조회 1,756
🐛 버그신고