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

· 19년 전 · 2423
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,297
19년 전 조회 3,267
19년 전 조회 4,133
19년 전 조회 1,995
19년 전 조회 2,210
19년 전 조회 2,141
19년 전 조회 3,344
19년 전 조회 2,715
19년 전 조회 3,505
19년 전 조회 2,680
19년 전 조회 2,519
19년 전 조회 2,341
19년 전 조회 2,232
19년 전 조회 2,124
19년 전 조회 4,251
19년 전 조회 2,673
19년 전 조회 2,157
19년 전 조회 2,258
19년 전 조회 2,840
19년 전 조회 1,957
19년 전 조회 3,197
19년 전 조회 2,756
19년 전 조회 2,265
19년 전 조회 1,808
19년 전 조회 2,233
19년 전 조회 2,005
19년 전 조회 1,901
19년 전 조회 2,462
19년 전 조회 2,318
19년 전 조회 3,880
19년 전 조회 3,736
19년 전 조회 2,238
19년 전 조회 3,280
19년 전 조회 1,953
19년 전 조회 2,381
19년 전 조회 2,272
19년 전 조회 2,340
19년 전 조회 2,174
19년 전 조회 2,810
19년 전 조회 2,818
19년 전 조회 3,168
19년 전 조회 3,039
19년 전 조회 2,705
19년 전 조회 2,921
19년 전 조회 3,171
19년 전 조회 2,873
19년 전 조회 2,610
19년 전 조회 2,922
19년 전 조회 4,501
19년 전 조회 2,424
19년 전 조회 2,445
19년 전 조회 3,481
19년 전 조회 3,152
19년 전 조회 2,804
19년 전 조회 2,046
19년 전 조회 1,772
19년 전 조회 2,875
19년 전 조회 1,721
19년 전 조회 2,310
19년 전 조회 3,951
19년 전 조회 3,732
19년 전 조회 3,450
19년 전 조회 3,404
19년 전 조회 1,563
19년 전 조회 1,931
19년 전 조회 1,856
19년 전 조회 2,521
19년 전 조회 4,618
19년 전 조회 2,752
19년 전 조회 1,918
19년 전 조회 1,926
19년 전 조회 1,813
19년 전 조회 2,555
19년 전 조회 8,173
19년 전 조회 2,722
19년 전 조회 2,791
19년 전 조회 3,040
19년 전 조회 2,196
19년 전 조회 2,209
19년 전 조회 2,173
19년 전 조회 2,067
19년 전 조회 2,257
19년 전 조회 2,514
19년 전 조회 3,080
19년 전 조회 2,329
19년 전 조회 1,905
19년 전 조회 2,831
19년 전 조회 4,997
19년 전 조회 3,496
19년 전 조회 3,453
19년 전 조회 2,974
19년 전 조회 2,396
19년 전 조회 1,487
19년 전 조회 3,134
19년 전 조회 2,009
19년 전 조회 5,370
19년 전 조회 2,429
19년 전 조회 3,431
19년 전 조회 2,853
19년 전 조회 1,762
🐛 버그신고