Java String Decamel Case decamel(String name)

Here you can find the source of decamel(String name)

Description

decamel

License

Apache License

Declaration

public static String decamel(String name) 

Method Source Code

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

public class Main {
    public static String decamel(String name) {
        // De-CamelCase the ISO 20022 Name
        // Hat tip to polygenelubricants @ http://stackoverflow.com/a/2560017
        if (name == null)
            return null;
        return name.replaceAll(String.format("%s|%s|%s", "(?<=[A-Z])(?=[A-Z][a-z])", "(?<=[^A-Z])(?=[A-Z])",
                "(?<=[A-Za-z])(?=[^A-Za-z])"), " ");
    }/*  www.j  av a2  s  .  c  o  m*/
}

Related

  1. deCamelCap(String s)
  2. deCamelCase(final String original)
  3. deCamelCase(String camelCased, String delim)
  4. deCamelCase(String identifier)