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. 멀티바이트 스트링 관련 함수들이 굉장히 많던데 성능면에서 효율적인지가 궁금합니다..
잘 아시는분 있으면 알려주세요.. ^^;;
게시글 목록
| 번호 | 제목 |
|---|---|
| 11717 | |
| 11716 | |
| 11714 | |
| 20302 | |
| 20301 | |
| 11713 |
JavaScript
GET,POST값 등을 JAVASCRIPT에서 사용할 경우[펌]
|
| 11712 | |
| 11711 |
MySQL
특정 폴더에서 PHP 실행 금지하기[펌]
|
| 11708 | |
| 11706 |
JavaScript
jQuery 의 delegate 흉내내기
1
|
| 11705 |
JavaScript
script 디버깅 - JSHint
|
| 11703 |
jQuery
jQuery 롤링배너 플러그인
1
|
| 20300 | |
| 11701 | |
| 11700 | |
| 11699 | |
| 11698 |
JavaScript
스크립트 for문
|
| 20298 |
HTML
디바이스별 해상도 확인
1
|
| 11697 | |
| 11696 |
PHP
php oop 단일 모드
|
| 11695 | |
| 11694 |
PHP
IP class 비교 함수
|
| 11693 |
jQuery
심플한 파일첨부 버튼과 jquery
|
| 11692 |
JavaScript
자바스크립트 시작날짜 종료날짜 유효성 검사 함수
|
| 11691 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기