Split two keys out a string created by _join_keys_v1.
356792
def _split_keys_v1(joined):
    
    left, _, right = joined.partition('::')
    return _decode_v1(left), _decode_v1(right)
1350582
def split_obj (obj, prefix = None):
    '''
    
    '''
    # copy the object, optionally add the prefix before each key

    new = obj.copy() if prefix is None else { '{}_{}'.format(prefix, k): v for k, v in obj.items() }

    # try to find the key holding the subobject or a list of subobjects
    for k, v in new.items():
        # list of subobjects
        if isinstance(v, list):
            # this is a list of strings or ints, which is a one-to-many
            # can't deal with that here, but leave the data in case it's 
            # useful downstream
            if not isinstance(v[0], dict):
                new[k] = ','.join(v)
                return new, None, None
            del new[k]
            return new, k, v
        # or just one subobject
        elif isinstance(v, dict):
            del new[k]
            return new, k, [v]
    return new, None, None
333838
function splitStr2Obj(source) {
    var result = {};
    each(
        source.split(','),
        function (key) {
            result[key] = key;
        }
    );
    return result;
}
672753
def _gen_keys_from_multicol_key(key_multicol, n_keys):
    """"""
    keys = [('{}{:03}of{:03}')
            .format(key_multicol, i+1, n_keys) for i in range(n_keys)]
    return keys
426265
def _join_strings(x):
    """"""
    for i in range(len(x)-1):  # Process successive pairs of elements
        if x[i]['t'] == 'Str' and x[i+1]['t'] == 'Str':
            x[i]['c'] += x[i+1]['c']
            del x[i+1]  # In-place deletion of element from list
            return None  # Forces processing to repeat
    return True
514389
def parse(key_string: str) -> 'Key':
        
        parts = key_string.split(Key.PARTITION)
        key_type = KeyType.DIMENSION
        if parts[3]:
            key_type = KeyType.TIMESTAMP
        return Key(key_type, parts[0], parts[1], parts[2].split(Key.DIMENSION_PARTITION)
                   if parts[2] else [],
                   parser.parse(parts[3]) if parts[3] else None)
368781
public static String combine(String str1, String str2, String separator) {

        if (separator == null || separator.isEmpty()) {
            return str1 == null ? str2 : str1.concat(str2);
        }
        if (str1 == null)
            str1 = "";
        if (str2 == null)
            str2 = "";

        StringBuilder builder = new StringBuilder();
        if (str1.endsWith(separator)) {
            builder.append(str1.substring(0, str1.length() - separator.length()));
        } else {
            builder.append(str1);
        }
        builder.append(separator);

        if (str2.startsWith(separator)) {
            builder.append(str2.substring(separator.length()));
        } else {
            builder.append(str2);
        }

        return builder.toString();
    }
191813
def split_strings(subtree: dict) -> List[str]:
    
    strings = subtree["strings"]
    lengths = subtree["lengths"]
    if lengths.shape[0] == 0 and strings.shape[0] == 0:
        return []
    strings = strings[0]
    if subtree.get("str", True):
        strings = strings.decode("utf-8")
    result = [None] * lengths.shape[0]
    offset = 0
    for i, l in enumerate(lengths):
        result[i] = strings[offset:offset + l]
        offset += l
    return result
1070892
def normalize_string_keys(old):
    """"""
    new = {}
    for key, value in old.items():
        if isinstance(key, bytes_):
            new[key.decode('utf8')] = value
        else:
            new[key] = value
    return new
420387
private static String split(String s) {
        int i = s.lastIndexOf('.');
        if (i < 0)
            return s;
        else
            return s.substring(i + 1);
    }
29656
function splitKeys (keys) {
		if (typeof(keys) === 'string') {
			return keys.replace(/^\s*\.\s*/,'')
				.replace(/(?:\s*\.\s*)+/g, '.')
				.split('.');
		}
		else if (Array.isArray(keys)) {
			return [].concat(keys);
		}
		return;
	}
1201843
function (key) {
    var string = key.split('.');
    string.shift(0);
    var value = string.join('.');
    return value;
  }
1085211
def _parse_key(key):
    '''
    
    '''
    splt = key.split("\\")
    hive = splt.pop(0)
    key = '\\'.join(splt)
    return hive, key
543448
def _split_index(params):
    
    result = {}
    for key in params:
        if isinstance(params[key], dict):
            value = params[key]['_value']
        else:
            value = params[key]
        result[key] = value
    return result
156152
def transform(data, keysToSplit=[]):
    
    transformed = { }
    for key in data:
        if key in keysToSplit:
            transformed[key] = data[key]['value'].split(SEPARATOR)
        else:
            transformed[key] = data[key]['value']
    return transformed
121526
def _parse_key_from_substring(substring) -> str:
    '''
    
    '''
    try:
        return substring.split(':')[0]
    except (ValueError, IndexError, TypeError, AttributeError):
        log.exception('Unexpected argument to _parse_key_from_substring:')
        raise ParseError(
            'Unexpected argument to _parse_key_from_substring: {}'.format(
                substring))
886698
def _split_index(self, key):
        
        if not isinstance(key, tuple):
            key = (key,)
        elif key == ():
            return (), ()

        if key[0] is Ellipsis:
            num_pad = self.ndims - len(key) + 1
            key = (slice(None),) * num_pad + key[1:]
        elif len(key) < self.ndims:
            num_pad = self.ndims - len(key)
            key = key + (slice(None),) * num_pad

        map_slice = key[:self.ndims]
        if self._check_key_type:
            map_slice = self._apply_key_type(map_slice)
        if len(key) == self.ndims:
            return map_slice, ()
        else:
            return map_slice, key[self.ndims:]