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

· 19년 전 · 2508
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,392
19년 전 조회 3,371
19년 전 조회 4,229
19년 전 조회 2,099
19년 전 조회 2,302
19년 전 조회 2,231
19년 전 조회 3,431
19년 전 조회 2,814
19년 전 조회 3,602
19년 전 조회 2,774
19년 전 조회 2,605
19년 전 조회 2,432
19년 전 조회 2,320
19년 전 조회 2,211
19년 전 조회 4,347
19년 전 조회 2,765
19년 전 조회 2,241
19년 전 조회 2,342
19년 전 조회 2,936
19년 전 조회 2,043
19년 전 조회 3,286
19년 전 조회 2,846
19년 전 조회 2,354
19년 전 조회 1,883
19년 전 조회 2,335
19년 전 조회 2,100
19년 전 조회 1,983
19년 전 조회 2,548
19년 전 조회 2,404
19년 전 조회 3,979
19년 전 조회 3,820
19년 전 조회 2,334
19년 전 조회 3,380
19년 전 조회 2,044
19년 전 조회 2,467
19년 전 조회 2,354
19년 전 조회 2,424
19년 전 조회 2,266
19년 전 조회 2,895
19년 전 조회 2,910
19년 전 조회 3,242
19년 전 조회 3,117
19년 전 조회 2,787
19년 전 조회 3,011
19년 전 조회 3,251
19년 전 조회 2,963
19년 전 조회 2,693
19년 전 조회 3,020
19년 전 조회 4,594
19년 전 조회 2,509
19년 전 조회 2,531
19년 전 조회 3,569
19년 전 조회 3,236
19년 전 조회 2,894
19년 전 조회 2,130
19년 전 조회 1,871
19년 전 조회 2,962
19년 전 조회 1,812
19년 전 조회 2,393
19년 전 조회 4,035
19년 전 조회 3,815
19년 전 조회 3,534
19년 전 조회 3,487
19년 전 조회 1,646
19년 전 조회 2,012
19년 전 조회 1,934
19년 전 조회 2,609
19년 전 조회 4,697
19년 전 조회 2,845
19년 전 조회 2,008
19년 전 조회 2,009
19년 전 조회 1,901
19년 전 조회 2,645
19년 전 조회 8,261
19년 전 조회 2,817
19년 전 조회 2,869
19년 전 조회 3,138
19년 전 조회 2,278
19년 전 조회 2,295
19년 전 조회 2,257
19년 전 조회 2,146
19년 전 조회 2,337
19년 전 조회 2,600
19년 전 조회 3,163
19년 전 조회 2,409
19년 전 조회 1,987
19년 전 조회 2,909
19년 전 조회 5,085
19년 전 조회 3,578
19년 전 조회 3,529
19년 전 조회 3,060
19년 전 조회 2,480
19년 전 조회 1,566
19년 전 조회 3,211
19년 전 조회 2,086
19년 전 조회 5,448
19년 전 조회 2,512
19년 전 조회 3,517
19년 전 조회 2,934
19년 전 조회 1,837