mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
removing TimeHelper::trim() closes #3049
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5915 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
e1a0f554e1
commit
0f6c59ce50
1 changed files with 0 additions and 12 deletions
|
@ -35,18 +35,6 @@
|
|||
* @subpackage cake.cake.libs.view.helpers
|
||||
*/
|
||||
class TimeHelper extends AppHelper {
|
||||
|
||||
/**
|
||||
* Returns given string trimmed to given length, adding an ending (default: "..") if necessary.
|
||||
*
|
||||
* @param string $string String to trim
|
||||
* @param integer $length Length of returned string, excluding ellipsis
|
||||
* @param string $ending Ending to be appended after trimmed string
|
||||
* @return string Trimmed string
|
||||
*/
|
||||
function trim($string, $length, $ending = '..') {
|
||||
return substr($string, 0, $length) . (strlen($string) > $length ? $ending : null);
|
||||
}
|
||||
/**
|
||||
* Returns a UNIX timestamp, given either a UNIX timestamp or a valid strtotime() date string.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue