Node.js examples for String:sub string
String truncate End
String.prototype.truncateEnd = function k(p, o) { if (p >= this.length) { return this }/*from w w w .j ava 2s . c o m*/ if (o === undefined) { o = "..." } return this.substring(0, (p - o.length)) + o };