Here you can find the source of convertStringToVarName(final String str)
public static String convertStringToVarName(final String str)
//package com.java2s; /*/*from w ww . ja v a 2 s. c om*/ * Copyright (c) 2013 - 2015 Naios <naios-dev@live.de> * * This file is part of WIde which is released under Creative Commons 4.0 (by-nc-sa) * See file LICENSE for full license details. */ public class Main { public static String convertStringToVarName(final String str) { return str.toUpperCase().replaceAll("[:punct:\\(\\)\\]\\['-]", "").replaceAll(" +", "_"); } }