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 void main(String[] args) {
    String str = "This Is a Test";

    str = str.toLowerCase();

    System.out.println(str);//ww w  . j a v  a 2s .  c  o  m
}

From source file:Main.java

public static void main(String[] argv) {
    String str = "Java2s.Com";
    System.out.println(str.toLowerCase());

}

From source file:Main.java

public static void main(String[] args) {
    String str = "STRING";
    String strLower = str.toLowerCase();
    System.out.println(str);/*from  w ww. ja v  a  2s .co  m*/
    System.out.println(strLower);
}

From source file:MainClass.java

public static void main(String args[]) {
    String org = "This is a test. This is, too.    ";
    System.out.println(org.toLowerCase());

}

From source file:Main.java

public static void main(String args[]) throws Exception {
    String fullURL = args[0];/*from   w  ww. j a  va2  s .co m*/
    URL u = new URL(fullURL);
    URLConnection conn = u.openConnection();
    conn.setDoInput(true);
    OutputStream theControl = conn.getOutputStream();
    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(theControl));
    for (int i = 1; i < args.length; i++) {
        out.write(args[i] + "\n");
    }
    out.close();
    InputStream theData = conn.getInputStream();

    String contentType = conn.getContentType();
    if (contentType.toLowerCase().startsWith("text")) {
        BufferedReader in = new BufferedReader(new InputStreamReader(theData));
        String line;
        while ((line = in.readLine()) != null) {
            System.out.println(line);
        }
    }
}

From source file:Main.java

public static void main(String args[]) throws Exception {
    String fullURL = args[0];//w  ww .j av  a  2 s  .  c om
    URL u = new URL(fullURL);
    URLConnection conn = u.openConnection();
    conn.setDoOutput(true);
    OutputStream theControl = conn.getOutputStream();
    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(theControl));
    for (int i = 1; i < args.length; i++) {
        out.write(args[i] + "\n");
    }
    out.close();
    InputStream theData = conn.getInputStream();

    String contentType = conn.getContentType();
    if (contentType.toLowerCase().startsWith("text")) {
        BufferedReader in = new BufferedReader(new InputStreamReader(theData));
        String line;
        while ((line = in.readLine()) != null) {
            System.out.println(line);
        }
    }
}

From source file:Main.java

public static void main(String[] args) {
    String str = "Result";
    String str1 = "rEsLtu";

    char[] firstString = str.toLowerCase().toCharArray();
    char[] secondString = str1.toLowerCase().toCharArray();

    Arrays.sort(firstString);/*from  w w  w .  j  ava2 s  .c o  m*/
    Arrays.sort(secondString);

    if (Arrays.equals(firstString, secondString) == true) {
        System.out.println("same");
    } else {
        System.out.println("different");
    }
}

From source file:com.mtag.trafficservice.TrafficApplication.java

public static void main(String[] args) {
    for (String arg : args) {
        String a = arg.toLowerCase();
        if (a.startsWith("--port=")) {
            Integer port = new Integer(a.substring(7));
            if (port != null) {
                ServerCustomizationBean.port = port;
            }// ww w .j  a v  a2 s  .  c  om
        } else {
            System.out.println("--- unknown argument '" + arg + "' ---");
            System.out.println();
            System.out.println("options are:");
            System.out.println("--port=n     change http-port to n (default is 8080)");
            System.out.println();
        }
    }
    //        new AnnotationConfigApplicationContext(Tra)
    SpringApplication.run(TrafficApplication.class, args);
}

From source file:ChangeCase.java

public static void main(String args[]) {
    String s = "This is a test.";

    System.out.println("Original: " + s);

    String upper = s.toUpperCase();
    String lower = s.toLowerCase();

    System.out.println("Uppercase: " + upper);
    System.out.println("Lowercase: " + lower);
}

From source file:disko.PDFDocument.java

public static void main(String[] args) {
    File dir = new File("/var/tmp/muriloq/mdc/selected");

    File[] pdfFiles = dir.listFiles(new FilenameFilter() {
        public boolean accept(File dir, String name) {
            return name.toLowerCase().endsWith(".pdf");
        }//  w ww.  jav a  2 s  . c om
    });

    for (File f : pdfFiles) {
        try {
            System.out.println(f.getName());
            PDFDocument pdf = new PDFDocument(f);
            pdf.getFullText();
            System.out.println(pdf.getFullText());
        } catch (Throwable t) {
            t.printStackTrace();
        }
    }
}