package net.kevxu.purdueassist.course.shared;

@SuppressWarnings("unused")
public class Utilities {

	/**
	 * Verify CRN number.
	 * 
	 * @param crn
	 *            crn number.
	 * @return true if crn number is valid, false if invalid.
	 */
	public static boolean verifyCrn(int crn) {
		// To be implemented
		return true;
	}

	/**
	 * Remove all the HTML tags in String.
	 * 
	 * @param rawString
	 *            input String.
	 * @return String without HTML tags.
	 */
	public static String removeHtmlTags(String rawString) {
		return rawString.replaceAll("\\<[^>]*>", "");
	}

	/**
	 * Shrink content in parentheses. i.e. "( ABC )" will be shrunk to "(ABC)"
	 * 
	 * @param rawString
	 *            input String.
	 * @return Shrunk String.
	 */
	public static String shrinkContentInParentheses(String rawString) {
		return rawString.replaceAll("\\(\\s+", "(").replaceAll("\\s+\\)",")");
	}

	private static int intNumberOfDigits(int number) {
		return (number == 0) ? 1 : (int) Math.log10(number) + 1;
	}

}

@@ -44,36 +44,8 @@
 d;%0A%0A
-@SuppressWarnings(%22unused%22)%0A
 publ
@@ -691,17 +691,17 @@
 @return 
-S
+s
 hrunk St
@@ -847,16 +847,17 @@
 %5Cs+%5C%5C)%22,
+ 
 %22)%22);%0A%09%7D
@@ -863,15 +863,156 @@
 %7D%0A%0A%09
-private
+/**%0A%09 * Count number of digits contained in an Integer.%0A%09 * %0A%09 * @param number%0A%09 *            the number.%0A%09 * @return number of digits.%0A%09 */%0A%09public
  sta

make intNumberOfDigits public.