List of usage examples for java.lang String toUpperCase
public String toUpperCase()
From source file:Main.java
public static boolean isOSX() { String os = System.getProperty("os.name"); return os.toUpperCase().contains("MAC OS X"); }
From source file:Main.java
public static boolean isEmpty(String str) { return null == str || "".equals(str) || "NULL".equals(str.toUpperCase()); }
From source file:Main.java
public static boolean isWindows() { String os = System.getProperty("os.name"); return os.toUpperCase().contains("WINDOWS"); }
From source file:com.github.mjlipote.google.chart.Type.java
@JsonCreator public static Type fromLiteral(String literal) { return Type.valueOf(literal.toUpperCase()); }
From source file:Main.java
public static boolean argEquals(String string, String string2) { if (string.toLowerCase().equals(string2.toLowerCase())) return true; StringBuilder sb = new StringBuilder(); for (char c : string2.toCharArray()) { String h = Character.toString(c); if (h.toUpperCase().equals(h)) { sb.append(h);// w ww. jav a 2 s . c om } } if (sb.toString().toLowerCase().equals(string.toLowerCase())) return true; return false; }
From source file:Main.java
public static String getSetterName(String fieldName) { if (fieldName == null || fieldName.length() == 0) return ""; String first = String.valueOf(fieldName.charAt(0)); first = first.toUpperCase(); return "set" + first + fieldName.substring(1); }
From source file:Main.java
public static String revers(String num) { num = num.toUpperCase(); char array[] = num.toCharArray(); for (int i = 0; i < array.length; i++) { if (array[i] == 'A') array[i] = reverseToChar(15 - 10); else if (array[i] == 'B') array[i] = reverseToChar(15 - 11); else if (array[i] == 'C') array[i] = reverseToChar(15 - 12); else if (array[i] == 'D') array[i] = reverseToChar(15 - 13); else if (array[i] == 'E') array[i] = reverseToChar(15 - 14); else if (array[i] == 'F') array[i] = reverseToChar(15 - 15); else// w ww. j a va 2 s. co m array[i] = reverseToChar(15 - Integer.parseInt(String.valueOf(array[i]))); } // return String.valueOf(array); }
From source file:Main.java
/** * Gets the readable gtin./* w ww . ja v a2 s. c o m*/ * * @param src the src * @return the readable gtin */ public static String getReadableGtin(String src) { src = src.toUpperCase(); if (src.length() < 1) { return ""; } char c = src.charAt(0); if (src.length() < 15) { return src; } if (c == 'A') { return src.substring(15 - 8, src.length()); } if (c == 'B') { return src.substring(15 - 12, src.length()); } if (c == 'C') { return src.substring(15 - 13, src.length()); } if (c == 'D') { return src.substring(15 - 14, src.length()); } // 'Z' return src.substring(1); }
From source file:Main.java
/** * s2b.// w ww. j a v a 2 s . c om * * @param val the val * @return true, if successful */ public static boolean s2b(String val) { //str2bool if (val.toUpperCase() == "TRUE") { return true; } if (val.toUpperCase() == "FALSE") { return false; } return false; }
From source file:Main.java
public static String makeIntentActionName(Class<?> cls, String actionName) { return String.format("%s.action.%s", cls.getName(), actionName.toUpperCase()); }