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

· 19년 전 · 2600
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,495
19년 전 조회 3,466
19년 전 조회 4,334
19년 전 조회 2,198
19년 전 조회 2,399
19년 전 조회 2,324
19년 전 조회 3,536
19년 전 조회 2,899
19년 전 조회 3,692
19년 전 조회 2,873
19년 전 조회 2,701
19년 전 조회 2,527
19년 전 조회 2,424
19년 전 조회 2,316
19년 전 조회 4,443
19년 전 조회 2,862
19년 전 조회 2,337
19년 전 조회 2,444
19년 전 조회 3,029
19년 전 조회 2,151
19년 전 조회 3,385
19년 전 조회 2,951
19년 전 조회 2,458
19년 전 조회 1,982
19년 전 조회 2,427
19년 전 조회 2,209
19년 전 조회 2,083
19년 전 조회 2,650
19년 전 조회 2,496
19년 전 조회 4,078
19년 전 조회 3,935
19년 전 조회 2,442
19년 전 조회 3,476
19년 전 조회 2,145
19년 전 조회 2,573
19년 전 조회 2,460
19년 전 조회 2,522
19년 전 조회 2,374
19년 전 조회 3,005
19년 전 조회 3,012
19년 전 조회 3,344
19년 전 조회 3,223
19년 전 조회 2,890
19년 전 조회 3,104
19년 전 조회 3,342
19년 전 조회 3,059
19년 전 조회 2,794
19년 전 조회 3,121
19년 전 조회 4,695
19년 전 조회 2,601
19년 전 조회 2,626
19년 전 조회 3,676
19년 전 조회 3,331
19년 전 조회 2,986
19년 전 조회 2,235
19년 전 조회 1,969
19년 전 조회 3,058
19년 전 조회 1,913
19년 전 조회 2,490
19년 전 조회 4,130
19년 전 조회 3,920
19년 전 조회 3,635
19년 전 조회 3,582
19년 전 조회 1,753
19년 전 조회 2,122
19년 전 조회 2,039
19년 전 조회 2,713
19년 전 조회 4,802
19년 전 조회 2,936
19년 전 조회 2,098
19년 전 조회 2,108
19년 전 조회 2,000
19년 전 조회 2,744
19년 전 조회 8,360
19년 전 조회 2,913
19년 전 조회 2,977
19년 전 조회 3,239
19년 전 조회 2,379
19년 전 조회 2,405
19년 전 조회 2,363
19년 전 조회 2,251
19년 전 조회 2,436
19년 전 조회 2,694
19년 전 조회 3,269
19년 전 조회 2,518
19년 전 조회 2,096
19년 전 조회 3,014
19년 전 조회 5,194
19년 전 조회 3,672
19년 전 조회 3,642
19년 전 조회 3,158
19년 전 조회 2,584
19년 전 조회 1,665
19년 전 조회 3,315
19년 전 조회 2,190
19년 전 조회 5,552
19년 전 조회 2,623
19년 전 조회 3,626
19년 전 조회 3,042
19년 전 조회 1,947