This commit is contained in:
@@ -339,6 +339,23 @@ export default {
|
||||
);
|
||||
},
|
||||
///////////////////////////////
|
||||
// Truncate a string
|
||||
//truncates and adds ellipses
|
||||
//
|
||||
// @param {String} source string
|
||||
// @param {number} length desired
|
||||
// @return {string} A new string truncated with ellipses at end
|
||||
truncateString: function(s, len) {
|
||||
if (this.stringIsNullOrEmpty(s)) {
|
||||
return s;
|
||||
}
|
||||
if (s.length > len) {
|
||||
return s.substring(0, len) + "...";
|
||||
} else {
|
||||
return s;
|
||||
}
|
||||
},
|
||||
///////////////////////////////
|
||||
// Format tags for display
|
||||
//
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user