Java String Camel Case To camelCaseToPhrase(String camelCase)

Here you can find the source of camelCaseToPhrase(String camelCase)

Description

camel Case To Phrase

License

Open Source License

Declaration

public static String camelCaseToPhrase(String camelCase) 

Method Source Code

//package com.java2s;

public class Main {
    public static String camelCaseToPhrase(String camelCase) {
        if (isEmpty(camelCase)) {
            return "";
        }// ww  w  .  j  a v  a2  s .  co  m
        String camelCaseSpaced = camelCase.replaceAll("([^A-Z])([A-Z])", "$1 $2");
        return camelCaseSpaced.charAt(0) + camelCaseSpaced.substring(1).toLowerCase();
    }

    public static boolean isEmpty(String string) {
        return string == null || string.isEmpty();
    }
}

Related

  1. camelCaseToDashSeperated(String s)
  2. camelCaseToDotNotation(String string)
  3. camelCaseToEnum(String camelCase)
  4. camelCaseToEnum(String name)
  5. camelCaseToHuman(String input)
  6. camelCaseToPretty(String camelCase)
  7. camelCaseToSeparatedWords(String ccString, String separator)
  8. camelCaseToSeparatorCase(String s, String separator)
  9. camelCaseToSpacedString(String camel)