//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// TypeScript helpers (universal micro-lib.) | Author: Sergei Y.Kitaev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Manipulation with strings (static class):
class HStr {
    static HasLength(str) {
        return str != null && str.length > 0;
    }
    static IsVisible(str) {
        return str != null && str.trim().length > 0;
    }
    static NullAsEmpty(str) {
        return str != null ? str : '';
    }
    static EmptyAsNull(str) {
        return str == '' ? null : str;
    }
    static EmptyAsUndefined(str) {
        return str == '' ? undefined : str;
    }
    static BlankAsNull(str) {
        return str != null && str.trim() == "" ? null : str;
    }
    static BlankAsUndefined(str) {
        return str != null && str.trim() == "" ? undefined : str;
    }
    static Trim(str) {
        return str != null && str.length > 0 ? str.trim() : str;
    }
    static TrimOrNull(str) {
        str = str != null ? str.trim() : null;
        return str && str.length > 0 ? str : null;
    }
    static TrimOrEmpty(str) {
        return str != null ? str.trim() : '';
    }
} // HStr
//# sourceMappingURL=HStr.js.map