package com.dw.lib;

import java.util.UUID;

public class RandomService {
	
	public static int UUIDRandom(int baseNum) {
		String uuid = UUID.randomUUID().toString();
		uuid = uuid.replace("-", "");

		int total = 0;
		for (int i = 0; i < uuid.length(); i++) {
			char c = uuid.charAt(i);
			int num = 0;
			if (c >= '0' && c <= '9') {
				num = c - '0';
			}

			if (c >= 'a' && c <= 'z') {
				num = c - 'a' + 10;
			}

			int base = 1;
			for (int j = 0; j < i; j++) {
				base *= 16;
				base %= baseNum;
			}

			total += num * base;
		}
		return total % baseNum;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}

@@ -14,16 +14,41 @@
 w.lib;%0A%0A
+import java.util.Random;%0A
 import j
@@ -94,16 +94,318 @@
 ice %7B%0A%09%0A
+%09%0A%09/*%0A%09 * %0A%09 * @param length randomString lenght%0A%09 * */%0A%09public static String randomString(int length) %7B%0A%09%09StringBuilder sb = new StringBuilder();%0A%09%09%0A%09%09for(int i=0;i%3C=length/32;i++) %7B%0A%09%09%09sb.append(UUID.randomUUID().toString().replace(%22-%22, %22%22));%0A%09%09%7D%0A%09%09%0A%09%09return sb.toString().substring(0, length);%0A%09%7D%0A%09%0A
 %09public 
@@ -972,15 +972,94 @@
 od stub%0A
+%09%09String output = RandomService.randomString(10);%0A%09%09System.out.println(output);
 %0A%09%7D%0A%0A%7D%0A

update random string mixed with letter and number