Java String Camel Case camelCased(String str)

Here you can find the source of camelCased(String str)

Description

camel Cased

License

Apache License

Declaration

static public String camelCased(String str) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    static public String camelCased(String str) {
        StringBuilder result = new StringBuilder();
        for (String part : str.split("\\s+")) {
            result.append(capitalizedFirst(part));
        }//from w w w.  ja va  2  s.  co m
        return result.toString();
    }

    static public String capitalizedFirst(String str) {
        return str.substring(0, 1).toUpperCase() + str.substring(1);
    }
}

Related

  1. camelCase(String string, boolean firstUpper)
  2. camelCase(String text)
  3. camelCase(String text)
  4. camelCase(String text)
  5. camelCase(String text)
  6. camelCasedWord(String s)
  7. camelCaseWord(String word)
  8. cameliza(String str)
  9. cameliza(String str)