Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript set max length of string

String.prototype.trimEllip = function (length) {
  return this.length > length ? this.substring(0, length) + "..." : this;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #set #max #length #string
ADD COMMENT
Topic
Name
8+1 =