/**
 * Function provides a save string split functionality. If
 * the given string to split is undefined or null an empty
 * string array is returned.
 *
 * @param str string to split
 * @param separator separator of the split
 * @returns string []
 */
export function split(str, separator) {
    if (separator === void 0) { separator = ' '; }
    if (str === undefined || str === null) {
        return [];
    }
    return str.split(separator);
}
/**
 * Function returns the number value of the given key, if
 * the key is not found the key is added and the current map
 * size is set as value.
 *
 * @param idMap Map with string key and number value
 * @param name string key
 * @returns number of the given key.
 */
export function getDigit(idMap, name) {
    if (!idMap.has(name)) {
        idMap.set(name, idMap.size);
    }
    return idMap.get(name);
}
export function getLetter(idMap, name) {
    var digit = getDigit(idMap, name);
    return String.fromCharCode('A'.charCodeAt(0) + (digit % 5));
}
//# sourceMappingURL=Strings.js.map