MCPcopy Create free account
hub / github.com/ampproject/amphtml / padString

Function padString

third_party/subscriptions-project/swg.js:3323–3325  ·  view source on GitHub ↗

* Returns a string whose length matches the length of format. * @param {string} str * @param {string} format * @return {string}

(str, format)

Source from the content-addressed store, hash-verified

3321 * @return {string}
3322 */
3323function padString(str, format) {
3324 return (format + str).slice(-format.length);
3325}
3326
3327const PADDING = '00000000';
3328function toHex(buffer) {

Callers 1

toHexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected