Returns a string representation of all elements from an array,
in increasing lexicographic order of their string
representations.
971707
public static <T> String stringImg(T[] v) {
	if(v == null) return "null";

	StringBuffer buffer = new StringBuffer();

	Arrays.sort(v, new UComp<T>());
	for(int i=0; i<v.length; i++) {
	    buffer.append(v[i]);
	    buffer.append("\n");
	}

	return buffer.toString();
    }
204302
def symbol_array(array)
    result = []
    array.each do |item|
      result << item.to_sym unless item.nil?
    end
    result
  end
369011
public static String[] sortStringArray(String[] array) {
        if (isEmpty(array)) {
            return new String[0];
        }
        Arrays.sort(array);
        return array;
    }
326981
public static String[] charArrayToStringArray(char[][] charArrays)
	{
		if (charArrays == null)
		{
			return null;
		}
		int length = charArrays.length;
		if (length == 0)
		{
			return NO_STRINGS;
		}
		String[] strings = new String[length];
		for (int i = 0; i < length; i++)
		{
			strings[i] = new String(charArrays[i]);
		}
		return strings;
	}
397294
public static String arrayToString(Object[] array) {
		if (array == null)
			DialectException.throwEX("StrUtils arrayToString() method do not accept null parameter");
		StringBuilder sb = new StringBuilder();
		for (Object object : array)
			sb.append("" + object + ",");
		if (sb.length() > 0)
			sb.setLength(sb.length() - 1);
		return sb.toString();
	}

	/**
	 * Change a Object array to connected string by given seperateString
	 */
	public static String arrayToString(Object[] array, String seperateString) {
		if (array == null)
			DialectException.throwEX("StrUtils arrayToString() method do not accept null parameter");
		StringBuilder sb = new StringBuilder();
		for (Object object : array)
			sb.append("" + object + seperateString);
		if (sb.length() > 0)
			sb.setLength(sb.length() - seperateString.length());
		return sb.toString();
	}

	/**
	 * Change a Object List to "obj1,obj2...,objn" String
	 */
	public static String listToString(List<?> lst) {
		if (lst == null)
			DialectException.throwEX("StrUtils listToString() method do not accept null parameter");
		StringBuilder sb = new StringBuilder();
		for (Object object : lst)
			sb.append("" + object + ",");
		if (sb.length() > 0)
			sb.setLength(sb.length() - 1);
		return sb.toString();
	}

	/**
	 * Join 2 String array into one
	 */
	public static String[] joinStringArray(String[] array1, String[] array2) {
		List<String> l = new ArrayList<String>();
		for (String string : array1)
			l.add(string);
		for (String string : array2)
			l.add(string);
		return l.toArray(new String[l.size()]);
	}
424943
function stringToArrayLike(str, array) {
    for (var i = 0; i < str.length; ++i) {
        array[i] = str.charCodeAt(i) & 0xFF;
    }
    return array;
}
1041871
function(str) {
    var results = [];
    for (var name in PDoc.elements) {
      if (name.toLowerCase().include(str.toLowerCase()))
        results.push(PDoc.elements[name]);
    }
    return results;
  }
452464
public static String arrayToList(String[] array, String delimiter) {
	if (ArrayUtil.isEmpty(array)) return "";
	StringBuilder sb = new StringBuilder(array[0]);

	if (delimiter.length() == 1) {
	    char c = delimiter.charAt(0);
	    for (int i = 1; i < array.length; i++) {
		sb.append(c);
		sb.append(array[i]);
	    }
	}
	else {
	    for (int i = 1; i < array.length; i++) {
		sb.append(delimiter);
		sb.append(array[i]);
	    }
	}

	return sb.toString();
    }
378361
public static String[] strListToArray(List<String> list) {
		if (list == null)
			return new String[0];
		return list.toArray(new String[list.size()]);
	}
158397
function(str) {
    var T = this, k, child, ret = [];
    if (str === undefined) {
      str = "";
    }
    if (T === undefined) {
      return [];
    }
    if (T.words > 0) {
      ret.push(str);
    }
    for (k in T.children) {
      if (T.children.hasOwnProperty(k)) {
        child = T.children[k];
        ret = ret.concat(child.getAllWords(str + k));
      }
    }
    return ret;
  }
874662
public static String[] readStringArray(DataInput in) throws IOException {
        int len = in.readInt();
        if (len == -1)
            return null;
        String[] s = new String[len];
        for (int i = 0; i < len; i++) {
            s[i] = readString(in);
        }
        return s;
    }
1097524
public String format(Object... array) {
    if (array == null) {
      return StringUtils.EMPTY;
    }
    if (array.length == 1 && array[0].getClass().isArray()) {
      return format(Convert.convert(array[0], Iterable.class));
    }
    return format(Arrays.asList(array).iterator());
  }
1160465
static public final int[] RLEStringToIntArray(String s) {
        int length = getInt(s, 0);
        int[] array = new int[length];
        int ai = 0, i = 1;

        int maxI = s.length() / 2;
        while (ai < length && i < maxI) {
            int c = getInt(s, i++);

            if (c == ESCAPE) {
                c = getInt(s, i++);
                if (c == ESCAPE) {
                    array[ai++] = c;
                } else {
                    int runLength = c;
                    int runValue = getInt(s, i++);
                    for (int j=0; j<runLength; ++j) {
                        array[ai++] = runValue;
                    }
                }
            }
            else {
                array[ai++] = c;
            }
        }

        if (ai != length || i != maxI) {
            throw new IllegalStateException("Bad run-length encoded int array");
        }

        return array;
    }
1224
@Deprecated
	public static String[] getStringArray(List<?> V) {
		if(V==null) return null;
		int len = V.size();
		String[] SA = new String[len];
		for (int c = 0; c < len; c++) {
			Object O=V.get(c);
			SA[c]=O==null?null:O.toString();
		}
		return SA;
	}
268964
String[] toArray() {
    String[] arr = new String[super.size()];
    Enumeration it = super.keys();
    int i = -1;
    while (it.hasMoreElements()) {
      String key = (String) it.nextElement();
      String val = (String) get(key);
      i++;
      arr[i] = key + "=" + val;
    }
    return arr;
  }
1268225
function toArray(iterable) {
    // kinda optimisations
    if (isArray(iterable)) {
        return iterable.slice();
    }
    if (typeof iterable === 'string') {
        return iterable.split('');
    }

    var iter = ensureIter(iterable);
    var result = [];
    var next = iter.next();
    while (!next.done) {
        result.push(next.value);
        next = iter.next();
    }
    return result;
}
867905
private String toJsStringSet(Iterable<String> strings) {
    StringBuilder sb = new StringBuilder();
    boolean isFirst = true;
    sb.append('{');
    for (String str : strings) {
      if (!isFirst) {
        sb.append(", ");
      }
      isFirst = false;
      writeStringLiteral(str, sb);
      sb.append(": true");
    }
    sb.append('}');
    return sb.toString();
  }