This commit is contained in:
@@ -147,7 +147,29 @@ export default {
|
||||
}
|
||||
|
||||
return ret;
|
||||
}, ///////////////////////////////
|
||||
},
|
||||
///////////////////////////////
|
||||
// Splice a string
|
||||
//changes the content of a string by removing a range of
|
||||
// characters and/or adding new characters.
|
||||
//
|
||||
// @param {String} source string
|
||||
// @param {number} start Index at which to start changing the string.
|
||||
// @param {number} delCount An integer indicating the number of old chars to remove.
|
||||
// @param {string} newSubStr The String that is spliced in.
|
||||
// @return {string} A new string with the spliced substring.
|
||||
stringSplice: function(source, start, delCount, newSubStr) {
|
||||
if (source == null || source == "") {
|
||||
return "";
|
||||
}
|
||||
return (
|
||||
source.slice(0, start) +
|
||||
newSubStr +
|
||||
this.slice(start + Math.abs(delCount))
|
||||
);
|
||||
},
|
||||
|
||||
///////////////////////////////
|
||||
// ICON FOR *ALL* OBJECT TYPES
|
||||
//(used for search results and event log / history)
|
||||
//NOTE: Any object type could appear in event log, they all need to be supported where possible
|
||||
|
||||
Reference in New Issue
Block a user