3.137.183.14 |    

Navigation

Google Advertisement

Diese Funktion kürzt ein String nach N (default 30) Zeichen und hängt drei Punkte am Ende des String an.

strim
  1. // **************************************************************
  2. // strim -- cut a string after X chars and append three points
  3. //
  4. //      string strim( string string [, int length ] )
  5.  
  6. function strim ( $string, $length = 30 ) {
  7.  
  8. if ( strlen( $string ) > $length )
  9.     $string = substr( $string, 0, $length )."...";
  10. return $string;
  11.  
  12. }
Parsed in 0.012 seconds at 27.20 KB/s

Search
 
Full text search by name and content of a snippet.

User online
There are 6 users online.

Tags Cloud

Latest snippets
str2seconds
(Bash::Function)
is_integer
(Bash::Function)
file_rotate
(Bash::Function)
confirm
(Bash::Function)
is_workingtime
(Bash::Function)
last day of last month
(Bash::Snippets)
crypt_apr1_md5
(PHP::Function)
crypt_apr1_md5
(Perl::Function)
transparent
(CSS)
rfc2822Toiso8601
(PHP::Function)