UNPKG

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.

18 lines (17 loc) 397 B
/** * @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: string, b: string, sep: string = ""): string { tmp[0] = a; tmp[1] = b; const result = tmp.join(sep); tmp[0] = ""; tmp[1] = ""; return result; } const tmp = ["", ""];