string_list : string_list COMMA STRING
                       | STRING
                       | empty
197325
def p_string_list(self, t):
        """"""

        if len(t) == 4:
            t[0] = t[1]
            t[0].append(t[3])
        elif t[1]:
            t[0] = [t[1]]
        else:
            t[0] = []
813384
def comma_separated_list(self, node, subnodes):
        
        for item in subnodes:
            position = (item.last_line, item.last_col)
            first, last = find_next_comma(self.lcode, position)
            if first:  # comma exists
                node.op_pos.append(NodeWithPosition(last, first))
372136
def convert_string_to_list(string_val):
    
    result_list = []

    list_string = string_val.split(',')
    for val in list_string:
        val = str(val.strip())
        val = val.replace("(", "")
        val = val.replace(")", "")
        val = val.replace("L", "")
        val = val.replace("[", "")
        val = val.replace("]", "")
        if val not in ("", "None"):
            result_list.append(int(val))

    return result_list
182603
def strSlist(string):
    
    sign = '-' if string[0] == '-' else '+'
    values = [abs(int(x)) for x in string.split(':')]
    return _fixSlist(list(sign) + values)
1099687
function(str, delimiter){

	var retlist = null;

	if( ! us.isUndefined(str) ){
	    if( us.isUndefined(delimiter) ){
		delimiter = /\s+/;
	    }
	    
	    retlist = str.split(delimiter);
	}

	return retlist;
    }
280500
function processListItems(list_str) {

        listLevel++;

        list_str = list_str.replace(/\n{2,}$/,"\n");
        list_str += "~0";

        list_str = list_str.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm, function(wholeMatch,m1,m2,m3,m4){

            var item = m4;
            var leading_line = m1;
            var leading_space = m2;

            if (leading_line || (item.search(/\n{2,}/)>-1)) {
                item = runBlockGamut(outdent(item));
            }
            else {
                item = doLists(outdent(item));
                item = item.replace(/\n$/,"");
                item = runSpanGamut(item);
            }

            return  "<li>" + item + "</li>\n";
        });

        list_str = list_str.replace(/~0/g,"");
        listLevel--;

        return list_str;
    }
950352
def _string_from_cmd_list(cmd_list):
    """"""
    cl = []
    for arg in map(str, cmd_list):
        if ' ' in arg or '\t' in arg:
            arg = '"' + arg + '"'
        cl.append(arg)
    return ' '.join(cl)
190693
private static <L extends List<String>> L trimStringList(L strings)
    {
        for (ListIterator<String> listIt = strings.listIterator(); listIt.hasNext(); )
        {
            String string = listIt.next().trim();
            listIt.set(string);
        }
        return strings;
    }
357359
def listify_string(something):
    
    if isinstance(something, (str, six.text_type)):
        return [something]
    elif something is not None:
        return list(something)
    else:
        return list()
1372963
def eval_str_to_list(input_str: str) -> List[str]:
    """"""
    inner_cast = ast.literal_eval(input_str)  # type: List[str]
    if isinstance(inner_cast, list):
        return inner_cast
    else:
        raise ValueError
1135216
public static String listInsertAt(String list, int pos, String value, String delimiter, boolean ignoreEmpty) throws ExpressionException {
	if (pos < 1) throw new ExpressionException("invalid string list index [" + (pos) + "]");

	char[] del = delimiter.toCharArray();
	char c;
	StringBuilder result = new StringBuilder();
	String end = "";
	int len;

	// remove at start
	if (ignoreEmpty) {
	    outer: while (list.length() > 0) {
		c = list.charAt(0);
		for (int i = 0; i < del.length; i++) {
		    if (c == del[i]) {
			list = list.substring(1);
			result.append(c);
			continue outer;
		    }
		}
		break;
	    }
	}

	// remove at end
	if (ignoreEmpty) {
	    outer: while (list.length() > 0) {
		c = list.charAt(list.length() - 1);
		for (int i = 0; i < del.length; i++) {
		    if (c == del[i]) {
			len = list.length();
			list = list.substring(0, len - 1 < 0 ? 0 : len - 1);
			end = c + end;
			continue outer;
		    }

		}
		break;
	    }
	}

	len = list.length();
	int last = 0;

	int count = 0;
	outer: for (int i = 0; i < len; i++) {
	    c = list.charAt(i);
	    for (int y = 0; y < del.length; y++) {
		if (c == del[y]) {

		    if (!ignoreEmpty || last < i) {
			if (pos == ++count) {
			    result.append(value);
			    result.append(del[0]);
			}
		    }
		    result.append(list.substring(last, i));
		    result.append(c);
		    last = i + 1;
		    continue outer;
		}
	    }
	}
	count++;
	if (last <= len) {
	    if (pos == count) {
		result.append(value);
		result.append(del[0]);
	    }

	    result.append(list.substring(last));
	}
	if (pos > count) {
	    throw new ExpressionException("invalid string list index [" + (pos) + "], indexes go from 1 to " + (count));

	}

	return result + end;
    }
486398
def assumption_list_string(assumptions, assumption_dict):
    '''

    '''
    if isinstance(assumptions, six.string_types):
        raise TypeError('assumptions must be an iterable of strings, not a '
                        'string itself')
    for a in assumptions:
        if a not in assumption_dict.keys():
            raise ValueError('{} not present in assumption_dict'.format(a))
    assumption_strings = [assumption_dict[a] for a in assumptions]
    return strings_to_list_string(assumption_strings)
845782
def strip_block_whitespace(string_list):
    """"""
    min_ws = min([(len(x) - len(x.lstrip())) for x in string_list if x != '\n'])
    return [x[min_ws:] if x != '\n' else x for x in string_list]
93342
function listParser(str) {
	var list = str.split(',');
	for (var i = 0; i < list.length; i++)
		list[i] = list[i].replace(/(^\s?)|(\s?$)/g, '');
	return list;
}
315705
def convert_csv_str_to_list(csv_str: str) -> list:
    """"""

    csv_str = re.sub("^\s*{", "", csv_str)
    csv_str = re.sub("}\s*$", "", csv_str)
    r = csv.reader([csv_str])
    row = list(r)[0]
    new = []
    for col in row:
        col = re.sub('^\s*"?\s*', "", col)
        col = re.sub('\s*"?\s*$', "", col)
        new.append(col)

    return new
787940
public static List<String> splitToList(final String value) {
        if (!StringUtils.isEmpty(value)) {
            return COMMA_SPLITTER.splitToList(value);
        }
        return Collections.<String> emptyList();
    }
1180326
public static String join(List<String> list, String delim) {

		StringBuilder sb = new StringBuilder();

		String loopDelim = "";

		for (String s : list) {

			sb.append(loopDelim);
			sb.append(s);

			loopDelim = delim;
		}

		return sb.toString();
	}