Get Smarty

Donate

Donate Bitcoin Bitcoin
Paypal

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Buy cheap eyeglasses from Cheapglasses123.com and save up to 80%.

Buy prescription glasses from www.australiaglasses.com and save.

Cheap Glasses Now On Sale at GlassesPeople.com. Starts At $7.95.

Where to buy discount wedding dresses and cheap smart dresses free shipping - Weddingdresstrend.com

Brautkleider auf Topwedding.de

Find free files to download on allwhatyouwant.net

Looking For Affordable Wedding Dresses 2015 at Best Prices On TDBridal.com

Shop high quality cheap prom dresses on Dresswe.co.uk

Buy New Arrival Cheap Prom Dresses 2015 at JDBRIDAL Prom Dress Store

Advertisement

truncate

鎴彇瀛楃涓插埌鎸囧畾闀垮害锛岄粯璁ら暱搴︽槸80. 绗簩涓弬鏁板彲閫夛紝鎸囧畾浜嗘埅鍙栧悗浠f浛鏄剧ず鐨勫瓧绗︺ 鎴彇鍚庣殑瀛楃闀垮害鏄埅鍙栬瀹氱殑闀垮害鍔犱笂绗簩涓弬鏁扮殑瀛楃闀垮害銆 榛樿truncate浼氬皾璇曟寜鍗曡瘝杩涜鎴彇銆 濡傛灉浣犲笇鏈涙寜瀛楃鎴彇锛堝崟璇嶅彲鑳戒細琚埅鏂級锛岄渶瑕佽缃涓変釜鍙傛暟TRUE

鍙傛暟椤哄簭 绫诲瀷 蹇呴夊弬鏁 榛樿鍊 璇存槑
1 integer No 80 鎴彇鐨勯暱搴
2 string No ... 鎴彇鍚庢浛浠f樉绀虹殑瀛楃锛岃瀛楃闀垮害浼氳璁$畻鍒版埅鍙栭暱搴﹀唴銆
3 boolean No FALSE 鏄惁鎸夊崟璇嶆埅鍙FALSE锛屾垨鏄寜瀛楃鎴彇TRUE
4 boolean No FALSE 褰撳瓧绗︽埅鍙栫殑闀垮害鍒氬ソ绛変簬瀛楃鏈韩闀垮害鏃讹紝鏄惁鎴彇銆 FALSE涔熶細鎴彇銆 TRUE鏄笉浼氭埅鍙栥 娉ㄦ剰濡傛灉璁剧疆涓TRUE锛屽崟璇嶇殑杈圭晫浼氳蹇界暐銆

Example聽5.21.聽truncate


<?php
$smarty->assign('articleTitle', 'Two Sisters Reunite after Eighteen Years at Checkout Counter.');
?>

   

妯℃澘锛


{$articleTitle}
{$articleTitle|truncate}
{$articleTitle|truncate:30}
{$articleTitle|truncate:30:""}
{$articleTitle|truncate:30:"---"}
{$articleTitle|truncate:30:"":true}
{$articleTitle|truncate:30:"...":true}
{$articleTitle|truncate:30:'..':true:true}

   

杈撳嚭锛


Two Sisters Reunite after Eighteen Years at Checkout Counter.
Two Sisters Reunite after Eighteen Years at Checkout Counter.
Two Sisters Reunite after...
Two Sisters Reunite after
Two Sisters Reunite after---
Two Sisters Reunite after Eigh
Two Sisters Reunite after E...
Two Sisters Re..ckout Counter.

   

Comments
No comments for this page.
Post a Comment
All comments are moderated. Support questions are ignored, use the forums instead.
Author:
Email: (not shown)
What is 13 plus 14? (Are you human?)

Advertisement