export class StringUtils
{
    static format(template: string, ...varContext: string[]): string
    {
        const context = Array.from(varContext);
        let contextIndex = 0;
        while (template.includes("%s"))
        {
            const currentContext = context.at(contextIndex);
            if (currentContext != null)
            {
                template = template.replace("%s", currentContext);
                contextIndex++;
            }
            else 
            {
                return template;
            }
        }
        return template;
    }
}