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

· 19년 전 · 2418
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,287
19년 전 조회 3,260
19년 전 조회 4,125
19년 전 조회 1,988
19년 전 조회 2,203
19년 전 조회 2,130
19년 전 조회 3,336
19년 전 조회 2,708
19년 전 조회 3,498
19년 전 조회 2,671
19년 전 조회 2,510
19년 전 조회 2,334
19년 전 조회 2,226
19년 전 조회 2,116
19년 전 조회 4,243
19년 전 조회 2,663
19년 전 조회 2,151
19년 전 조회 2,251
19년 전 조회 2,833
19년 전 조회 1,949
19년 전 조회 3,190
19년 전 조회 2,748
19년 전 조회 2,257
19년 전 조회 1,801
19년 전 조회 2,227
19년 전 조회 1,996
19년 전 조회 1,892
19년 전 조회 2,454
19년 전 조회 2,310
19년 전 조회 3,876
19년 전 조회 3,731
19년 전 조회 2,231
19년 전 조회 3,275
19년 전 조회 1,947
19년 전 조회 2,374
19년 전 조회 2,266
19년 전 조회 2,333
19년 전 조회 2,167
19년 전 조회 2,801
19년 전 조회 2,810
19년 전 조회 3,158
19년 전 조회 3,029
19년 전 조회 2,699
19년 전 조회 2,916
19년 전 조회 3,166
19년 전 조회 2,867
19년 전 조회 2,603
19년 전 조회 2,912
19년 전 조회 4,491
19년 전 조회 2,419
19년 전 조회 2,437
19년 전 조회 3,474
19년 전 조회 3,145
19년 전 조회 2,797
19년 전 조회 2,040
19년 전 조회 1,764
19년 전 조회 2,870
19년 전 조회 1,713
19년 전 조회 2,304
19년 전 조회 3,945
19년 전 조회 3,723
19년 전 조회 3,442
19년 전 조회 3,396
19년 전 조회 1,557
19년 전 조회 1,926
19년 전 조회 1,848
19년 전 조회 2,515
19년 전 조회 4,610
19년 전 조회 2,748
19년 전 조회 1,910
19년 전 조회 1,920
19년 전 조회 1,807
19년 전 조회 2,547
19년 전 조회 8,168
19년 전 조회 2,716
19년 전 조회 2,780
19년 전 조회 3,034
19년 전 조회 2,188
19년 전 조회 2,203
19년 전 조회 2,167
19년 전 조회 2,061
19년 전 조회 2,250
19년 전 조회 2,508
19년 전 조회 3,073
19년 전 조회 2,323
19년 전 조회 1,900
19년 전 조회 2,824
19년 전 조회 4,989
19년 전 조회 3,487
19년 전 조회 3,447
19년 전 조회 2,969
19년 전 조회 2,389
19년 전 조회 1,480
19년 전 조회 3,128
19년 전 조회 2,002
19년 전 조회 5,364
19년 전 조회 2,419
19년 전 조회 3,421
19년 전 조회 2,846
19년 전 조회 1,755
🐛 버그신고