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

· 19년 전 · 2491
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,369
19년 전 조회 3,353
19년 전 조회 4,207
19년 전 조회 2,082
19년 전 조회 2,286
19년 전 조회 2,214
19년 전 조회 3,418
19년 전 조회 2,792
19년 전 조회 3,584
19년 전 조회 2,748
19년 전 조회 2,591
19년 전 조회 2,413
19년 전 조회 2,308
19년 전 조회 2,193
19년 전 조회 4,333
19년 전 조회 2,738
19년 전 조회 2,224
19년 전 조회 2,323
19년 전 조회 2,922
19년 전 조회 2,028
19년 전 조회 3,273
19년 전 조회 2,835
19년 전 조회 2,343
19년 전 조회 1,874
19년 전 조회 2,316
19년 전 조회 2,088
19년 전 조회 1,965
19년 전 조회 2,532
19년 전 조회 2,384
19년 전 조회 3,959
19년 전 조회 3,805
19년 전 조회 2,315
19년 전 조회 3,363
19년 전 조회 2,031
19년 전 조회 2,457
19년 전 조회 2,344
19년 전 조회 2,409
19년 전 조회 2,249
19년 전 조회 2,882
19년 전 조회 2,888
19년 전 조회 3,229
19년 전 조회 3,101
19년 전 조회 2,771
19년 전 조회 2,999
19년 전 조회 3,237
19년 전 조회 2,948
19년 전 조회 2,677
19년 전 조회 3,004
19년 전 조회 4,570
19년 전 조회 2,492
19년 전 조회 2,507
19년 전 조회 3,553
19년 전 조회 3,223
19년 전 조회 2,873
19년 전 조회 2,122
19년 전 조회 1,850
19년 전 조회 2,949
19년 전 조회 1,795
19년 전 조회 2,377
19년 전 조회 4,016
19년 전 조회 3,802
19년 전 조회 3,520
19년 전 조회 3,473
19년 전 조회 1,629
19년 전 조회 1,996
19년 전 조회 1,920
19년 전 조회 2,590
19년 전 조회 4,682
19년 전 조회 2,827
19년 전 조회 1,992
19년 전 조회 1,996
19년 전 조회 1,892
19년 전 조회 2,626
19년 전 조회 8,243
19년 전 조회 2,797
19년 전 조회 2,852
19년 전 조회 3,116
19년 전 조회 2,258
19년 전 조회 2,277
19년 전 조회 2,238
19년 전 조회 2,134
19년 전 조회 2,322
19년 전 조회 2,581
19년 전 조회 3,152
19년 전 조회 2,396
19년 전 조회 1,970
19년 전 조회 2,896
19년 전 조회 5,067
19년 전 조회 3,560
19년 전 조회 3,511
19년 전 조회 3,044
19년 전 조회 2,460
19년 전 조회 1,546
19년 전 조회 3,199
19년 전 조회 2,070
19년 전 조회 5,420
19년 전 조회 2,494
19년 전 조회 3,498
19년 전 조회 2,922
19년 전 조회 1,819