Breaks a string at <astr_separator> and joins into a
  list. Steps along all list elements and strips white
  space.

  The list elements are explicitly ascii encoded.
438248
def str2lst(astr_input, astr_separator=" "):
  
  alistI = astr_input.split(astr_separator)
  alistJ = []
  for i in range(0, len(alistI)):
    alistI[i] = alistI[i].strip()
    alistI[i] = alistI[i].encode('ascii')
    if len(alistI[i]):
      alistJ.append(alistI[i])
  return alistJ
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
1062157
public static String join(List<String> list, String separator) {
        if (list == null) {
            return null;
        }

        return join(list.toArray(), separator, 0, list.size());
    }
582753
def join(items, separator=None):
    
    if not items:
        return ''
    if separator is None:
        separator = _default_separator()
    return separator.join([str(item) for item in items])
1053123
def split(self, s):
        """"""

        normalized = "".join(map(lambda c: " " if c.isspace() else c, s))

        string = False
        quote = False
        v = []
        for col, char in enumerate(normalized.rstrip(), 1):
            if char == '\\':
                quote = True
            if char == '"' and not quote:
                if string:
                    v[-1] = (v[-1][0], v[-1][1] + '"')
                string = not string

            if char.isspace() and not string:
                v.append((col, ""))
            else:
                if len(v) == 0:
                    v.append((col, char))
                else:
                    col, part = v[-1]
                    v[-1] = (col, part + char)

            if char != '\\' and quote:
                quote = False

        return [t_p for t_p in v if t_p[1] != ""]
219224
private static List<String> splitOuter(String str, char sepChr) {
        List<String> result = new ArrayList<String>();
        StringBuilder buffer = new StringBuilder();
        int nesting = 0;
        boolean bInQuote = false;
        for (int index = 0; index < str.length(); index++) {
            char ch = str.charAt(index);
            switch (ch) {
            case '(':
                buffer.append(ch);
                nesting++;
                break;
            case ')':
                buffer.append(ch);
                nesting--;
                break;
            case '\'':
            case '"':
                buffer.append(ch);
                if (bInQuote) {
                    nesting--;
                } else {
                    nesting++;
                }
                bInQuote = !bInQuote;
                break;
            case ',':
                if (nesting == 0) {
                    result.add(buffer.toString());
                    buffer.setLength(0);
                } else {
                    buffer.append(ch);
                }
                break;
            default:
                buffer.append(ch);
            }
        }
        if (buffer.length() > 0) {
            result.add(buffer.toString());
        }
        return result;
    }
837862
def _space_delimited_list(value):
    '''
    
    '''
    if isinstance(value, six.string_types):
        items = value.split(' ')
        valid = items and all(items)
    else:
        valid = hasattr(value, '__iter__') and (value != [])

    if valid:
        return True, 'space-delimited string'
    return False, '{0} is not a valid list.\n'.format(value)
229097
public static String[] splitToArray(String str, String separator, int limit, boolean isTrim, boolean ignoreEmpty){
		return toArray(split(str, separator, limit, isTrim, ignoreEmpty));
	}
414747
def _split_str(s, n):
    
    length = len(s)
    return [s[i:i + n] for i in range(0, length, n)]
414046
def list2string (inlist,delimit=' '):
    
    stringlist = [makestr(_) for _ in inlist]
    return string.join(stringlist,delimit)
559570
private static List<String> split(String str, char delim) {

    List<String> result = Lists.newArrayList();

    int currPartStart = 0;
    while (true) {
      int currPartEnd = str.indexOf(delim, currPartStart);
      if (currPartEnd == -1) {
        result.add(str.substring(currPartStart));
        break;
      } else {
        result.add(str.substring(currPartStart, currPartEnd));
        currPartStart = currPartEnd + 1;
      }
    }

    return result;
  }
637726
@SneakyThrows
   public static List<String> split(CharSequence input, char separator) {
      if (input == null) {
         return new ArrayList<>();
      }
      Preconditions.checkArgument(separator != '"', "Separator cannot be a quote");
      try (CSVReader reader = CSV.builder().delimiter(separator).reader(new StringReader(input.toString()))) {
         List<String> all = new ArrayList<>();
         List<String> row;
         while ((row = reader.nextRow()) != null) {
            all.addAll(row);
         }
         return all;
      }
   }
8784
public static String stringJoin(List list, String separator) {
        StringBuilder ret = new StringBuilder();
        boolean first = true;
        for (Object o : list) {
            if (!first) {
                ret.append(separator);
            }
            ret.append(o);
            first = false;
        }
        return ret.toString();
    }
1145959
private String listToString(List<String> stringList){
		StringBuilder concat = new StringBuilder();
		for(String str:stringList){
			concat.append(str);
			concat.append(System.getProperty("line.separator"));
		}
		return concat.toString();
	}
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
1144300
static private String[] getStringList( String str )
    {
        if ( str == null )
        {
            return null;
        }
        List<String> list = new ArrayList<>();
        int i = 0;
        int length = str.length();
        StringBuffer sb = null;
        while ( i < length )
        {
            char ch = str.charAt( i );
            if ( ch == ' ' )
            {
                // A space was hit. Add string to list
                if ( sb != null )
                {
                    list.add( sb.toString() );
                    sb = null;
                }
            }
            else if ( ch == '\\' )
            {
                // It is a delimiter. Add next character
                if ( i + 1 < length )
                {
                    ch = str.charAt( ++i );
                    if ( sb == null )
                    {
                        sb = new StringBuffer();
                    }
                    sb.append( ch );
                }
            }
            else
            {
                if ( sb == null )
                {
                    sb = new StringBuffer();
                }
                sb.append( ch );
            }
            i++; // Next character
        }
        // Make sure to add the last part to the list too
        if ( sb != null )
        {
            list.add( sb.toString() );
        }
        if ( list.size() == 0 )
        {
            return null;
        }
        String[] results = new String[list.size()];
        return list.toArray( results );
    }
1187445
public static List<String> splitByRegex(String str, String separatorRegex, int limit, boolean isTrim, boolean ignoreEmpty){
		final Pattern pattern = PatternPool.get(separatorRegex);
		return split(str, pattern, limit, isTrim, ignoreEmpty);
	}