Java Class Simple Name Get ToSimpleName(String str)

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

Description

To Simple Name

License

Open Source License

Declaration

public static String ToSimpleName(String str) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String ToSimpleName(String str) {
        String[] strs = str.split("_");
        String simpleName = strs[0];
        if (strs.length > 1) {
            simpleName = str.replaceFirst(strs[0] + "_", "");
        }//from   w w  w  .java  2 s . com
        return simpleName;
    }
}

Related

  1. toSimpleName(final String qualifiedName)
  2. toSimpleName(String className)
  3. toSimpleName(String classPackageName)
  4. toSimpleName(String fqn)
  5. toSimpleName(String qname)