mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 07:14:35 +02:00
parent
17d0f7be5e
commit
c4a69191a3
@ -386,6 +386,24 @@
|
|||||||
}[c];
|
}[c];
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pad a string with another one
|
||||||
|
*
|
||||||
|
* @param {String} str the string to pad
|
||||||
|
* @param {String} padding the string to use for padding
|
||||||
|
* @param {Number} minLength the minimum length of the result
|
||||||
|
*
|
||||||
|
* @returns {String} the padded string
|
||||||
|
*/
|
||||||
|
padString: function(str, padding, minLength) {
|
||||||
|
str = String(str);
|
||||||
|
padding = String(padding);
|
||||||
|
while (str.length < minLength) {
|
||||||
|
str = padding + str;
|
||||||
|
}
|
||||||
|
return str;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user