public static String[] sortByLength(String[] saSource, boolean bAsc) {
		if ((saSource == null) || (saSource.length <= 0)) {
			return null;
		}

		int iLength = saSource.length;
		String[] saDest = new String[iLength];

		for (int i = 0; i < iLength; i++) {
			saDest[i] = saSource[i];
		}

		String sTemp = "";
		int j = 0, k = 0;

		for (j = 0; j < iLength; j++) {
			for (k = 0; k < iLength - j - 1; k++) {
				if ((saDest[k].length() > saDest[k + 1].length()) && bAsc) {
					sTemp = saDest[k];
					saDest[k] = saDest[k + 1];
					saDest[k + 1] = sTemp;
				} else if ((saDest[k].length() < saDest[k + 1].length()) && !bAsc) {
					sTemp = saDest[k];
					saDest[k] = saDest[k + 1];
					saDest[k + 1] = sTemp;
				}
			}
		}
		return saDest;
	}