$this->loadHelper('text');
$this->Text->cut("hello world.",10,"...");
// hello worl...
$option=array('st'=>'<b>','et'=>'</b>');
$this->Text->highlight("hello thule, this is thule im thulerealythulebyebye","thule",$option);
$this->Text->highlight("hello thule, this is thule im thulerealythulebyebye","thule");
$this->Text->wordwrap("hello world hihihihihi.",10);
$this->Text->nl2br("hello world \nhihihihihi.",10);
$this->Text->htmlen("hello world \nhihihihihi.",10);
$this->Text->htmlden("hello world \nhihihihihi.",10);
$this->Text->addsl("'hello world \nhihihihihi.",10);
This feature will be very useful in search result.
$this->Text->keywordHighlight("hello", "'hello world \nhihihihihi.",10,array("st"=>"<span\>","et"=>"</span>"));