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

· 19년 전 · 2429
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,300
19년 전 조회 3,275
19년 전 조회 4,140
19년 전 조회 2,000
19년 전 조회 2,217
19년 전 조회 2,145
19년 전 조회 3,353
19년 전 조회 2,722
19년 전 조회 3,510
19년 전 조회 2,687
19년 전 조회 2,525
19년 전 조회 2,348
19년 전 조회 2,238
19년 전 조회 2,127
19년 전 조회 4,256
19년 전 조회 2,679
19년 전 조회 2,163
19년 전 조회 2,265
19년 전 조회 2,848
19년 전 조회 1,963
19년 전 조회 3,203
19년 전 조회 2,762
19년 전 조회 2,271
19년 전 조회 1,813
19년 전 조회 2,239
19년 전 조회 2,013
19년 전 조회 1,908
19년 전 조회 2,468
19년 전 조회 2,323
19년 전 조회 3,886
19년 전 조회 3,743
19년 전 조회 2,246
19년 전 조회 3,284
19년 전 조회 1,960
19년 전 조회 2,386
19년 전 조회 2,279
19년 전 조회 2,346
19년 전 조회 2,179
19년 전 조회 2,821
19년 전 조회 2,825
19년 전 조회 3,170
19년 전 조회 3,042
19년 전 조회 2,711
19년 전 조회 2,929
19년 전 조회 3,179
19년 전 조회 2,879
19년 전 조회 2,615
19년 전 조회 2,928
19년 전 조회 4,508
19년 전 조회 2,430
19년 전 조회 2,450
19년 전 조회 3,488
19년 전 조회 3,159
19년 전 조회 2,812
19년 전 조회 2,052
19년 전 조회 1,780
19년 전 조회 2,883
19년 전 조회 1,725
19년 전 조회 2,316
19년 전 조회 3,957
19년 전 조회 3,737
19년 전 조회 3,457
19년 전 조회 3,408
19년 전 조회 1,569
19년 전 조회 1,938
19년 전 조회 1,860
19년 전 조회 2,526
19년 전 조회 4,622
19년 전 조회 2,757
19년 전 조회 1,924
19년 전 조회 1,931
19년 전 조회 1,820
19년 전 조회 2,563
19년 전 조회 8,179
19년 전 조회 2,729
19년 전 조회 2,795
19년 전 조회 3,043
19년 전 조회 2,201
19년 전 조회 2,217
19년 전 조회 2,180
19년 전 조회 2,070
19년 전 조회 2,262
19년 전 조회 2,518
19년 전 조회 3,087
19년 전 조회 2,337
19년 전 조회 1,909
19년 전 조회 2,835
19년 전 조회 5,004
19년 전 조회 3,499
19년 전 조회 3,457
19년 전 조회 2,979
19년 전 조회 2,399
19년 전 조회 1,492
19년 전 조회 3,136
19년 전 조회 2,014
19년 전 조회 5,373
19년 전 조회 2,437
19년 전 조회 3,436
19년 전 조회 2,857
19년 전 조회 1,766