rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
17 lines • 408 B
JavaScript
/**
* @public
* Like concat but for only 2 parameters (yes it's dumb, but it can be a lot faster for lots of small joins).
*
* @remarks
* See {@link stringConcat2}.
*/
export function stringConcat2(a, b, sep = "") {
tmp[0] = a;
tmp[1] = b;
const result = tmp.join(sep);
tmp[0] = "";
tmp[1] = "";
return result;
}
const tmp = ["", ""];
//# sourceMappingURL=string-concat-2.js.map