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

· 19년 전 · 2425
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,299
19년 전 조회 3,270
19년 전 조회 4,138
19년 전 조회 1,999
19년 전 조회 2,213
19년 전 조회 2,142
19년 전 조회 3,349
19년 전 조회 2,719
19년 전 조회 3,508
19년 전 조회 2,685
19년 전 조회 2,522
19년 전 조회 2,344
19년 전 조회 2,233
19년 전 조회 2,125
19년 전 조회 4,252
19년 전 조회 2,676
19년 전 조회 2,158
19년 전 조회 2,261
19년 전 조회 2,843
19년 전 조회 1,959
19년 전 조회 3,199
19년 전 조회 2,758
19년 전 조회 2,267
19년 전 조회 1,811
19년 전 조회 2,235
19년 전 조회 2,008
19년 전 조회 1,906
19년 전 조회 2,464
19년 전 조회 2,318
19년 전 조회 3,883
19년 전 조회 3,740
19년 전 조회 2,242
19년 전 조회 3,282
19년 전 조회 1,956
19년 전 조회 2,383
19년 전 조회 2,276
19년 전 조회 2,342
19년 전 조회 2,178
19년 전 조회 2,814
19년 전 조회 2,822
19년 전 조회 3,170
19년 전 조회 3,040
19년 전 조회 2,708
19년 전 조회 2,924
19년 전 조회 3,173
19년 전 조회 2,876
19년 전 조회 2,613
19년 전 조회 2,925
19년 전 조회 4,505
19년 전 조회 2,426
19년 전 조회 2,446
19년 전 조회 3,487
19년 전 조회 3,155
19년 전 조회 2,807
19년 전 조회 2,048
19년 전 조회 1,776
19년 전 조회 2,879
19년 전 조회 1,721
19년 전 조회 2,312
19년 전 조회 3,954
19년 전 조회 3,733
19년 전 조회 3,453
19년 전 조회 3,404
19년 전 조회 1,567
19년 전 조회 1,936
19년 전 조회 1,859
19년 전 조회 2,524
19년 전 조회 4,620
19년 전 조회 2,755
19년 전 조회 1,919
19년 전 조회 1,928
19년 전 조회 1,816
19년 전 조회 2,557
19년 전 조회 8,176
19년 전 조회 2,727
19년 전 조회 2,793
19년 전 조회 3,041
19년 전 조회 2,197
19년 전 조회 2,213
19년 전 조회 2,177
19년 전 조회 2,069
19년 전 조회 2,260
19년 전 조회 2,516
19년 전 조회 3,083
19년 전 조회 2,333
19년 전 조회 1,907
19년 전 조회 2,833
19년 전 조회 5,000
19년 전 조회 3,497
19년 전 조회 3,455
19년 전 조회 2,976
19년 전 조회 2,397
19년 전 조회 1,489
19년 전 조회 3,135
19년 전 조회 2,010
19년 전 조회 5,372
19년 전 조회 2,431
19년 전 조회 3,433
19년 전 조회 2,855
19년 전 조회 1,764
🐛 버그신고