3.144.42.196 |    

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. def strim( string, length=30 ):
  2.     """strim -- cut a tring after X chars and append three points
  3.  
  4.     (string) strim( (string) string [, (int) length ] )"""
  5.     if len(string) > length:
  6.         string = string[0:length] + "..."
  7.     return string
Parsed in 0.002 seconds at 108.94 KB/s

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

User online
There are 3 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)