List of usage examples for java.lang String toLowerCase
public String toLowerCase()
From source file:Main.java
static List<String> getJsonAssets(Context context, String path) throws IOException { String[] assetList = context.getAssets().list(path); List<String> files = new ArrayList<>(); for (String asset : assetList) { if (asset.toLowerCase().endsWith(".json")) { files.add(asset);/*from w w w . ja va 2 s .c o m*/ } } return files; }
From source file:Main.java
/** * Parses the given attribute of this tag and returns it as a boolean. * Essentially compares the lower case textual value to the string "true" *///from w ww . java 2s.c o m public static boolean getAttribBoolean(Element ele, String name) { String sval = ele.getAttribute(name); return sval.toLowerCase().equals("true"); }
From source file:Main.java
public static String colorToHex(String color) { if (colorToHexMap.containsKey(color.toLowerCase())) { return colorToHexMap.get(color.toLowerCase()); }//from w ww. j av a 2 s . co m return color; }
From source file:Main.java
public static String getRatingFromString(String valueofRating) { String rate = valueofRating.toLowerCase(); if ("red".equals(rate)) { return "1"; }/*from w w w . j a v a 2 s. c o m*/ if ("green".equals(rate)) { return "3"; } if ("yellow".equals(rate)) { return "2"; } return "0"; }
From source file:Main.java
public static boolean startsWithFilePath(ArrayList<String> filePaths, String filePath) { String lowerCaseFilePath = filePath.toLowerCase(); for (String onePath : filePaths) { if (lowerCaseFilePath.startsWith(onePath.toLowerCase())) { return true; }//from www .j av a 2 s . c o m } return false; }
From source file:Main.java
public static String toJavaCasing(final String pName) { final char[] name = pName.toLowerCase().toCharArray(); name[0] = Character.toUpperCase(name[0]); return new String(name); }
From source file:Main.java
private static int parseColor(String colorName) { return Color.parseColor(colorName.toLowerCase()); }
From source file:cuchaz.m3l.lib.Side.java
public static Side get(String val) { return valueOf(StringUtils.capitalize(val.toLowerCase())); }
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);/*from w ww . j a v a 2 s. c om*/ } } if (sb.toString().toLowerCase().equals(string.toLowerCase())) return true; return false; }
From source file:Main.java
static boolean isVLCVideoMimeType(String mimeType) { return is_part_of(VIDEO_WITNESS, mimeType.toLowerCase()); }