class BundleNormalizer {

  public static String toConstName(String s) {
    Require.nonNull(s, "parameter s may not be null or empty.");
    Require.nonWhitespace(s, "parameter s may not be null or empty.");

    s= normalize(s);

    final char[] chars= s.toCharArray();
    final StringBuilder sb= new StringBuilder();

    //if the first char is a number, prepend it by an underscore
    if (Character.isDigit(chars[0])) {
      sb.append("_");
    }

    // Uppercase all chars
    for (int i=0; i<chars.length; i++) {
      sb.append(Character.toUpperCase(chars[i]));
    }

    return sb.toString();
  }

}