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

· 19년 전 · 2431
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,303
19년 전 조회 3,277
19년 전 조회 4,142
19년 전 조회 2,002
19년 전 조회 2,217
19년 전 조회 2,146
19년 전 조회 3,355
19년 전 조회 2,723
19년 전 조회 3,514
19년 전 조회 2,691
19년 전 조회 2,527
19년 전 조회 2,351
19년 전 조회 2,241
19년 전 조회 2,129
19년 전 조회 4,259
19년 전 조회 2,680
19년 전 조회 2,164
19년 전 조회 2,267
19년 전 조회 2,849
19년 전 조회 1,967
19년 전 조회 3,205
19년 전 조회 2,765
19년 전 조회 2,273
19년 전 조회 1,815
19년 전 조회 2,240
19년 전 조회 2,014
19년 전 조회 1,910
19년 전 조회 2,469
19년 전 조회 2,326
19년 전 조회 3,887
19년 전 조회 3,746
19년 전 조회 2,248
19년 전 조회 3,287
19년 전 조회 1,961
19년 전 조회 2,387
19년 전 조회 2,281
19년 전 조회 2,348
19년 전 조회 2,182
19년 전 조회 2,825
19년 전 조회 2,827
19년 전 조회 3,173
19년 전 조회 3,045
19년 전 조회 2,712
19년 전 조회 2,931
19년 전 조회 3,180
19년 전 조회 2,883
19년 전 조회 2,616
19년 전 조회 2,933
19년 전 조회 4,511
19년 전 조회 2,432
19년 전 조회 2,453
19년 전 조회 3,489
19년 전 조회 3,160
19년 전 조회 2,814
19년 전 조회 2,055
19년 전 조회 1,785
19년 전 조회 2,884
19년 전 조회 1,729
19년 전 조회 2,319
19년 전 조회 3,958
19년 전 조회 3,740
19년 전 조회 3,458
19년 전 조회 3,410
19년 전 조회 1,570
19년 전 조회 1,940
19년 전 조회 1,862
19년 전 조회 2,530
19년 전 조회 4,626
19년 전 조회 2,760
19년 전 조회 1,928
19년 전 조회 1,933
19년 전 조회 1,822
19년 전 조회 2,565
19년 전 조회 8,184
19년 전 조회 2,731
19년 전 조회 2,798
19년 전 조회 3,046
19년 전 조회 2,205
19년 전 조회 2,220
19년 전 조회 2,183
19년 전 조회 2,074
19년 전 조회 2,264
19년 전 조회 2,520
19년 전 조회 3,091
19년 전 조회 2,339
19년 전 조회 1,915
19년 전 조회 2,840
19년 전 조회 5,010
19년 전 조회 3,503
19년 전 조회 3,459
19년 전 조회 2,982
19년 전 조회 2,402
19년 전 조회 1,496
19년 전 조회 3,139
19년 전 조회 2,017
19년 전 조회 5,376
19년 전 조회 2,441
19년 전 조회 3,437
19년 전 조회 2,862
19년 전 조회 1,769