Example usage for java.lang String toLowerCase

List of usage examples for java.lang String toLowerCase

Introduction

In this page you can find the example usage for java.lang String toLowerCase.

Prototype

public String toLowerCase() 

Source Link

Document

Converts all of the characters in this String to lower case using the rules of the default locale.

Usage

From source file:Main.java

public static String getMineType(String path) {
    String suffix = getSuffix(path);
    return MimeTypeMap.getSingleton().getMimeTypeFromExtension(suffix.toLowerCase());
}

From source file:Main.java

public static boolean isRotationSupported(String mimeType) {
    if (mimeType == null)
        return false;
    mimeType = mimeType.toLowerCase();
    return mimeType.equals("image/jpeg");
}

From source file:Main.java

public static boolean isSupportedByRegionDecoder(String mimeType) {
    if (mimeType == null) {
        return false;
    }/*  w w  w . j  av  a2  s . c  o  m*/
    mimeType = mimeType.toLowerCase();
    return (!mimeType.startsWith("image/") || mimeType.equals("image/gif") || mimeType.endsWith("bmp")) ? false
            : true;
}

From source file:Main.java

@SuppressLint("DefaultLocale")
public static String getApkStringVerByFileName(String fileName) {
    String apkVer = null;/*from   www  .j  a  v a2s  .  com*/

    try {
        String s = fileName.toLowerCase();
        int i = s.indexOf("ver");
        i += 3;
        if (i + 5 < s.length()) {
            apkVer = s.substring(i, i + 5);
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    return apkVer;
}

From source file:Main.java

public static String lowerCase(String str) {
    if (str == null) {
        return null;
    }//from www . j  av a2 s.c  o m

    return str.toLowerCase();
}

From source file:Main.java

public static String aggregatedTextEquals(final String text) {
    return format("%s = '%s'", translateTextForPath("normalize-space(string(.))"), text.toLowerCase());
}

From source file:Main.java

public static boolean getBoolean(Node aNode, String attr, boolean defaultValue) {
    if (aNode.getAttributes().getNamedItem(attr) != null) {
        String docText = aNode.getAttributes().getNamedItem(attr).getNodeValue();
        if (docText.toLowerCase().equals("true")) {
            return true;
        }//  ww  w .  ja  v  a  2s.  c o  m
        if (docText.toLowerCase().equals("false")) {
            return false;
        }
        System.out.println("strange boolean value '" + docText + "'");
        return defaultValue;
    } else {
        return defaultValue;
    }
}

From source file:Main.java

public static boolean isWindows() {
    String osName = System.getProperty("os.name");
    osName = osName.toLowerCase();
    return osName.indexOf("windows") != -1;
}

From source file:Main.java

/**
 * Check the image whether support RegionDecode or no.
 * @param mimeType the image type./*from w w w  .j  av a2s .co  m*/
 * @return whether support RegionDecode or no.
 */
public static boolean isSupportedByRegionDecoder(String mimeType) {
    if (mimeType == null) {
        return false;
    }
    mimeType = mimeType.toLowerCase();
    return mimeType.startsWith("image/") && (!mimeType.equals("image/gif"));
}

From source file:Main.java

public static boolean parseBoolean(String value) {
    boolean boolValue = false;
    try {//  w w w .  ja v  a 2 s.  co  m
        boolValue = Boolean.parseBoolean(value.toLowerCase());
    } catch (Exception e) {
    }
    return boolValue;
}