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. 멀티바이트 스트링 관련 함수들이 굉장히 많던데 성능면에서 효율적인지가 궁금합니다..
잘 아시는분 있으면 알려주세요.. ^^;;
게시글 목록
| 번호 | 제목 |
|---|---|
| 11800 |
jQuery
마우스 오버 위치에 따라 툴팁 생성 및 자동 이동
|
| 11798 | |
| 11797 |
jQuery
제이쿼리 동적으로 생성된 객체에 이벤트 생성하기
|
| 11796 | |
| 11795 | |
| 11794 |
JavaScript
shuffle 배열섞기
|
| 11793 |
jQuery
제이쿼리 모음 사이트
|
| 11792 |
PHP
1원팁] IP 대역 비교
|
| 11791 | |
| 20314 | |
| 11785 |
PHP
input 쉽게 관리하기
5
|
| 11782 |
JavaScript
서버시간을 사용한 전자시계
2
|
| 11781 | |
| 20312 | |
| 11780 |
JavaScript
구글 웹사이트 번역기를 내 사이트에 달기
|
| 11778 | |
| 11773 | |
| 293 | |
| 11772 |
JavaScript
자바스크립트(4)
|
| 11771 |
PHP
자바스크립트(3)
|
| 11770 |
JavaScript
자바스크립트(2)
|
| 11769 |
JavaScript
자바스크립트(1)
|
| 11767 |
PHP
정규 표현식
1
|
| 11766 |
PHP
기타 함수
|
| 11765 |
PHP
수학 연산 함수
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기