List of usage examples for java.lang String toLowerCase
public String toLowerCase()
From source file:com.ms.commons.utilities.CoreUtilities.java
public static boolean isWindowsOS() { String p = System.getProperties().getProperty("os.name"); if (p != null && p.toLowerCase().indexOf("windows") != -1) { return true; }//from www .java 2 s . c om return false; }
From source file:net.sf.util.zip.FileNameUtil.java
/** * * @param fileName the file name// w w w .j a va2 s .co m * @return Archive file type, as defined in ArchiveStreamFactory */ public static String getArchieveFileType(String fileName) { String s = fileName.toLowerCase(); if (s.endsWith(".jar") || s.endsWith(".war") || s.endsWith(".ear")) return ArchiveStreamFactory.JAR; else if (s.endsWith(".tar")) return ArchiveStreamFactory.TAR; else if (s.endsWith(".zip")) return ArchiveStreamFactory.ZIP; return null; }
From source file:Main.java
/** * Creates a string with the given backgroundcolor. * * @param str String to be colorized. * @param color Constant defined color (see constants). * @param autoff boolean that toggles automatical appending of "attributes off" * sequence.<code>true<code> if "attributes off" should be appended, false * otherwise./*w w w. j a va 2s . co m*/ * @return String with internal markup-sequences. */ public static String colorizeBackground(String str, String color, boolean autoff) { if (autoff) { return colorizeBackground(str, color); } else { return INTERNAL_MARKER + color.toLowerCase() + str; } }
From source file:com.carlomicieli.jtrains.validation.ISOValidationUtils.java
/** * Returns {@code true} if the value is a valid 2-letter language code as defined in ISO 639. * @param lang the language code/* w w w . j ava2 s .com*/ * @return {@code true} if the value is a valid language; {@code false} otherwise */ public static boolean languageIsValid(String lang) { if (StringUtils.isBlank(lang)) { return true; } return Arrays.binarySearch(Locale.getISOLanguages(), lang.toLowerCase()) >= 0; }
From source file:com.netflix.astyanax.util.StringUtils.java
/** * Convert a string from "_" delimited to lower camel case * //from w w w . j av a 2s . c o m * @param s * @return */ public static String toCamelCase(String s) { String[] parts = s.split("_"); StringBuilder sb = new StringBuilder(); for (String part : parts) { if (sb.length() == 0) sb.append(part.toLowerCase()); else sb.append(toProperCase(part)); } return sb.toString(); }
From source file:controller.Parser.java
static boolean validVarName(String varName) { String varLow = varName.toLowerCase(); return !(varLow.equals("max") || varLow.equals("maximize") || varLow.equals("subject") || varLow.equals("to") || varLow.equals("s.t.")); }
From source file:io.starter.reactjs.ignite.Generator.java
public static String formatString(String input) { input = input.toLowerCase(); input = StringTool.replaceChars(" ", input, "_"); return input; }
From source file:net.doubledoordev.backend.util.Settings.java
public static User getUserByName(String name) { return SETTINGS.users.get(name.toLowerCase()); }
From source file:Main.java
public static boolean isSmartPhone(String userAgent) { if (null == userAgent) { return false; }/*from w w w . jav a 2s.c o m*/ String lowerUserAgent = userAgent.toLowerCase(); return isIphoneIpodIpad(lowerUserAgent) || isAndroid(lowerUserAgent) || isWindowsMobile(lowerUserAgent) || isSymbian(lowerUserAgent) || isBlackberry(lowerUserAgent); }
From source file:com.eviware.soapui.impl.wsdl.support.CompressionSupport.java
public static String getAvailableAlgorithm(String httpContentEncoding) { for (String alg : algs) { if (httpContentEncoding.toLowerCase().endsWith(alg)) { return alg; }/* w w w . j ava 2 s. co m*/ } return null; }