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

· 19년 전 · 2440
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,306
19년 전 조회 3,294
19년 전 조회 4,150
19년 전 조회 2,012
19년 전 조회 2,231
19년 전 조회 2,157
19년 전 조회 3,362
19년 전 조회 2,734
19년 전 조회 3,526
19년 전 조회 2,698
19년 전 조회 2,535
19년 전 조회 2,359
19년 전 조회 2,247
19년 전 조회 2,137
19년 전 조회 4,274
19년 전 조회 2,692
19년 전 조회 2,173
19년 전 조회 2,275
19년 전 조회 2,862
19년 전 조회 1,973
19년 전 조회 3,215
19년 전 조회 2,777
19년 전 조회 2,283
19년 전 조회 1,826
19년 전 조회 2,252
19년 전 조회 2,024
19년 전 조회 1,919
19년 전 조회 2,478
19년 전 조회 2,333
19년 전 조회 3,904
19년 전 조회 3,751
19년 전 조회 2,255
19년 전 조회 3,304
19년 전 조회 1,970
19년 전 조회 2,404
19년 전 조회 2,292
19년 전 조회 2,359
19년 전 조회 2,193
19년 전 조회 2,832
19년 전 조회 2,835
19년 전 조회 3,183
19년 전 조회 3,054
19년 전 조회 2,719
19년 전 조회 2,938
19년 전 조회 3,183
19년 전 조회 2,896
19년 전 조회 2,625
19년 전 조회 2,944
19년 전 조회 4,525
19년 전 조회 2,441
19년 전 조회 2,460
19년 전 조회 3,500
19년 전 조회 3,173
19년 전 조회 2,822
19년 전 조회 2,063
19년 전 조회 1,799
19년 전 조회 2,890
19년 전 조회 1,744
19년 전 조회 2,329
19년 전 조회 3,966
19년 전 조회 3,748
19년 전 조회 3,468
19년 전 조회 3,421
19년 전 조회 1,582
19년 전 조회 1,950
19년 전 조회 1,870
19년 전 조회 2,542
19년 전 조회 4,635
19년 전 조회 2,773
19년 전 조회 1,934
19년 전 조회 1,950
19년 전 조회 1,831
19년 전 조회 2,575
19년 전 조회 8,189
19년 전 조회 2,740
19년 전 조회 2,805
19년 전 조회 3,054
19년 전 조회 2,209
19년 전 조회 2,226
19년 전 조회 2,191
19년 전 조회 2,082
19년 전 조회 2,270
19년 전 조회 2,531
19년 전 조회 3,099
19년 전 조회 2,343
19년 전 조회 1,920
19년 전 조회 2,848
19년 전 조회 5,017
19년 전 조회 3,509
19년 전 조회 3,467
19년 전 조회 2,990
19년 전 조회 2,405
19년 전 조회 1,502
19년 전 조회 3,148
19년 전 조회 2,022
19년 전 조회 5,385
19년 전 조회 2,450
19년 전 조회 3,445
19년 전 조회 2,870
19년 전 조회 1,778