UNPKG

@genexus/web-standard-functions

Version:

GeneXus JavaScript standard functions library for web generators

19 lines 606 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.format = void 0; const rTrim_1 = require("./rTrim"); /** * Formats a string by replacing the placeholders with the specified parameters * @param {string} str The format string * @param {any[]} args The replacement strings * @return string */ const format = (str, ...args) => { let result = str; for (let i = 0; i < args.length; i++) { result = result.replace(`%${i + 1}`, (0, rTrim_1.rTrim)(args[i].toString())); } return result; }; exports.format = format; //# sourceMappingURL=format.js.map