declare global {
    interface StringConstructor {
        IsNullOrEmpty: (value: string) => boolean;
        Format: (format: string, ...args: any[]) => string;
    }
}

String.IsNullOrEmpty = function (value: string): boolean {
    return value === undefined || value === null || value.trim() === '';
};

String.Format = function (format: string, ...args: any[]): string {
    return format.replace(/{(\d+)}/g, (match, index) => {
        let value = args[index];
        if (value === null || value === undefined) return '';
        return '' + value;
    });
}

export { };
