/**
 *
 * @param {string} source
 * @param {string} term
 * @param {string} extra
 * @returns {string}
 */
export function insert_after(source, term, extra) {
    const i = source.indexOf(term);

    if (i === -1) {
        console.warn(`Term '${term}' not found in the source`, source, extra);
        return source;
    }

    const end = i + term.length;

    return source.slice(0, end) + extra + source.slice(end);
}


