Creates a {@link RubyArray} of Strings.

@param str
words separated by spaces
@return {@link RubyArray}
172766
public static RubyArray<String> qw(String str) {
    return Ruby.Array.copyOf(str.trim().split("\\s+"));
  }
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;
    }
755104
public static String mkString(@javax.annotation.Nonnull final String separator, final String... strs) {
    return Arrays.asList(strs).stream().collect(Collectors.joining(separator));
  }
458322
public static String arrayJoin(List<String> arr, String separator) {
		return (arr == null || separator == null) ? "" : StringUtils.join(arr, separator);
	}
1264013
public static List<String> splitTrim(String str, char separator, boolean ignoreEmpty){
		return split(str, separator, 0, true, ignoreEmpty);
	}
901791
public static String convertArrayToStr(Object[] str){
        StringBuilder sql = new StringBuilder();
        for(Object s : str){
            sql.append(",'").append(s).append("'");
        }
        return org.apache.commons.lang3.ArrayUtils.toString(sql).substring(1,sql.length());
    }
841953
function (hexStr) {
            // Shortcut
            var hexStrLength = hexStr.length;

            // Convert
            var words = [];
            for (var i = 0; i < hexStrLength; i += 2) {
                words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);
            }

            return new WordArray.init(words, hexStrLength / 2);
        }
1370988
public static <E> RubyArray<RubyArray<E>> ra(RubyArray<E> rubyArray) {
    RubyArray<RubyArray<E>> ra = newRubyArray();
    return ra.push(rubyArray);
  }
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 );
    }
145804
function (str) {
                str = stringify(str);
                var byteArray = [];

                for (var i = 0, l = str.length, ch; i < l; i++) {
                    ch = str.charCodeAt(i);
                    byteArray.push(ch >> 8);
                    byteArray.push(ch & 0xFF);
                }

                return byteArray;
            }
593134
public static RegExpr createKeyword(String str) {
        int i;
        RegExpr[] chars;

        if (str.length() == 1) {
            return new Range(str.charAt(0));
        } else {
            chars = new RegExpr[str.length()];
            for (i = 0; i < chars.length; i++) {
                chars[i] = new Range(str.charAt(i));
            }
            return new Sequence(chars);
        }
    }
798422
public static byte []
fromString(String str) {
	ByteArrayOutputStream bs = new ByteArrayOutputStream();
	byte [] raw = str.getBytes();
	for (int i = 0; i < raw.length; i++) {
		if (!Character.isWhitespace((char)raw[i]))
			bs.write(raw[i]);
	}
	byte [] in = bs.toByteArray();
	if (in.length % 2 != 0) {
		return null;
	}

	bs.reset();
	DataOutputStream ds = new DataOutputStream(bs);

	for (int i = 0; i < in.length; i += 2) {
		byte high = (byte) Base16.indexOf(Character.toUpperCase((char)in[i]));
		byte low = (byte) Base16.indexOf(Character.toUpperCase((char)in[i+1]));
		try {
			ds.writeByte((high << 4) + low);
		}
		catch (IOException e) {
		}
	}
	return bs.toByteArray();
}
775919
static public JSONArray parse(String str) throws IOException {
        StringReader strReader = new StringReader(str);
        return parse(strReader);
    }
1262677
public static String joinStrings( String separator, String... strings ) {
        if (separator == null) {
            separator = "";
        }
        StringBuilder sb = new StringBuilder();
        for( int i = 0; i < strings.length; i++ ) {
            sb.append(strings[i]);
            if (i < strings.length - 1) {
                sb.append(separator);
            }
        }
        return sb.toString();
    }
25274
public static byte[] string2Bytes(String str) {
    try {
      final int len = str.length();
      // if we can, we will use it to return the bytes
      byte[] rawBytes = new byte[len];
      
      // get all chars of the given string
      char[] charArray = UTF8.getCharArray(len);
      str.getChars(0, len, charArray, 0);
      
      for (int i = 0; i < len; i++) {
        if (charArray[i] > UTF8.MAX_ASCII_CODE) {
          // non-ASCII chars present
          // do expensive conversion
          return str.getBytes(utf8charsetName);
        }
        // copy to output array
        rawBytes[i] = (byte) charArray[i];
      }
      // only ASCII present - return raw bytes
      return rawBytes;
    } catch (UnsupportedEncodingException e) {
      assert false : "UTF8 encoding is not supported ";
    }
    return null;
  }
1109216
public static String[] split(String src, String separator) {
        if (isEmpty(separator)) {
            return new String[] { src };
        }
        if (isEmpty(src)) {
            return StringUtils.EMPTY_STRING_ARRAY;
        }
        return src.split(separator, -1);
    }
97611
public String encode(String str) throws IOException {
    	byte[] array;
    	try { 
    		array = str.getBytes(encoding);
    	} catch (IOException e) {
    		array = str.getBytes(); // take default
    	}
    	// Calculate expected size to avoid any buffer expansion copies within the ByteArrayOutput code
    	ByteArrayOutputStream baos = new ByteArrayOutputStream((int)(array.length*1.363)); // account for 4 bytes for 3 and a byte or two more
    	
    	encode(new ByteArrayInputStream(array),baos);
    	return baos.toString(encoding);
    }