Returns a random given length size passowrd string([a-zA-Z0-9]+).

@param stringLength the length of the random passowrd you want.
@return a random given length size passowrd string([a-zA-Z0-9]+).
499298
public static String getRandomPasswordString(final int stringLength) {

    StringBuilder stringBuilder = getStringBuild();
    for (int i = 0; i < stringLength; i++) {
      stringBuilder.append(getRandomPasswordChar());
    }
    return stringBuilder.toString();
  }
576390
public EasyRandomParameters stringLengthRange(final int minStringLength, final int maxStringLength) {
        if (minStringLength < 0) {
            throw new IllegalArgumentException("minStringLength must be >= 0");
        }
        if (minStringLength > maxStringLength) {
            throw new IllegalArgumentException(format("minStringLength (%s) must be <= than maxStringLength (%s)",
                    minStringLength, maxStringLength));
        }
        setStringLengthRange(new Range<>(minStringLength, maxStringLength));
        return this;
    }
851394
public static String getRandom(char[] sourceChar, int length) {
        if (sourceChar == null || sourceChar.length == 0 || length < 0) {
            return null;
        }
        StringBuilder str = new StringBuilder(length);
        Random random = new Random();
        for (int i = 0; i < length; i++) {
            str.append(sourceChar[random.nextInt(sourceChar.length)]);
        }
        return str.toString();
    }
871834
function generateRandomString(length) {
	let s = "";
	let i = length;
	while (length-- > 0) {
		let c = Math.floor(Math.random() * (MAX_HEX_SYMBOL - MIN_HEX_SYMBOL + 1)) + MIN_HEX_SYMBOL;
		c = c.toString(16).toLowerCase();
		s += c;
	}
	return s;
}
97934
def random_string(length):
    
    # avoid things that could be mistaken ex: 'I' and '1'
    letters = "23456789ABCDEFGHJKLMNPQRSTUVWXYZ"
    return "".join([random.choice(letters) for _ in range(length)])
1219053
public static String getRandomAlphaNumeric(int length) {
        if (length <= 0) {
            return "";
        }

        Random r = getRandom();

        StringBuffer result = new StringBuffer(length);

        for (int i = 0; i < length; i++) {
            int n = r.nextInt(alphaNumChars.length);
            result.append(alphaNumChars[n]);
        }

        return result.toString();
    }
575778
function randomString(_string_length, _mode) {
    
    var string_length = _string_length;
    if(string_length < 3)
    	string_length = 2;
    
    var chars = chars_all;
    
    if(_mode === 'lower_case') chars = chars_lower;
    else if(_mode === 'upper_case') chars = chars_upper;
    else if(_mode === 'nums_oly') chars = chars_nums;
    else if(_mode === 'especials') chars = chars_all + chars_spec;
    
    var str = '';
    for (var i=0; i<string_length; i++) {
        var rnum = Math.floor(Math.random() * chars.length);
        str += chars.substring(rnum,rnum+1);
    }
    
    return str;
}
111161
public static String getRandomString(final int size, final String stringSet) {

		final StringBuilder buff = new StringBuilder(size);

		for (int i = 0; i < size; i++) {
			final char nextChar = stringSet.charAt(RAN.nextInt(stringSet.length()));
			buff.append(nextChar);
		}
		return buff.toString();
	}
1369324
public static String wrap(String str, int wrapTextLength) {
	if (wrapTextLength <= 0) return str;

	StringBuilder rtn = new StringBuilder();
	String ls = SystemUtil.getOSSpecificLineSeparator();
	Array arr = ListUtil.listToArray(str, ls);
	int len = arr.size();

	for (int i = 1; i <= len; i++) {
	    rtn.append(wrapLine(Caster.toString(arr.get(i, ""), ""), wrapTextLength));
	    if (i + 1 < len) rtn.append(ls);
	}
	return rtn.toString();
    }
491671
function random(_length) {
    
    var string_length = _length;
    if(string_length < 0)
    	string_length = 1;
    	
    var chars = "0123456789";
    
    var num = '';
    for (var i=0; i<string_length; i++) {
        var rnum = Math.floor(Math.random() * chars.length);
        num += chars.substring(rnum,rnum+1);
    }
    return num*1;
}
1316119
public static String rand(int size) {
        StringBuilder num = new StringBuilder();
        for (int i = 0; i < size; i++) {
            double a = Math.random() * 9;
            a = Math.ceil(a);
            int randomNum = new Double(a).intValue();
            num.append(randomNum);
        }
        return num.toString();
    }
1064760
def random_string(length):
    
    valid_chars = string_ascii_letters + string_digits

    return ''.join(random.choice(valid_chars) for i in range(length))
66379
public static int getNumberCode(int length) {//-2147483648~2147483647
        if(length > 9)
            new Exception("The number is too big");
        Random random = new Random();
        StringBuffer max = new StringBuffer().append("8");
        StringBuffer min = new StringBuffer().append("1");
        while (max.length() <= length - 1) {
            max.append("9");
            min.append("0");
        }
        int maxNumber = Integer.parseInt(max.toString());
        int minNumber = Integer.parseInt(min.toString());
        return random.nextInt(maxNumber) + minNumber;
    }
177621
public static String random(int count, RandomType randomType) {
		if (count == 0) return "";
		if (count < 0) {
			throw new IllegalArgumentException("Requested random string length " + count + " is less than 0.");
		}
		char[] buffer = new char[count];
		for (int i = 0; i < count; i++) {
			if (randomType.equals(RandomType.INT)) {
				buffer[i] = _INT.charAt(RANDOM.nextInt(_INT.length()));
			} else if (randomType.equals(RandomType.STRING)) {
				buffer[i] = _STR.charAt(RANDOM.nextInt(_STR.length()));
			}else {
				buffer[i] = _ALL.charAt(RANDOM.nextInt(_ALL.length()));
			}
		}
		return new String(buffer);
	}
303525
public String readUTF8EncodedString(int stringLength) {
        if (stringLength > 0 && this.bufferPosition + stringLength <= this.bufferData.length) {
            this.bufferPosition += stringLength;
            try {
                return new String(this.bufferData, this.bufferPosition - stringLength, stringLength, CHARSET_UTF8);
            } catch (UnsupportedEncodingException e) {
                throw new IllegalStateException(e);
            }
        }
        LOGGER.warning("invalid string length: " + stringLength);
        return null;
    }
1260359
def __generate_string(length):  # pragma: no cover
        """"""
        return ''.join(
            SystemRandom().choice(string.ascii_letters + string.digits)
            for x in range(length)).encode()
822627
public static String generateSalt(int saltLength) {
		StringBuilder salt = new StringBuilder(saltLength);
		for (int i=0; i<saltLength; i++) {
			salt.append(CHAR_ARRAY[random.nextInt(CHAR_ARRAY.length)]);
		}
		return salt.toString();
	}