Here you can find the source of sanitizeName(String name)
public static String sanitizeName(String name)
//package com.java2s; //License from project: Open Source License public class Main { public static String sanitizeName(String name) { return name != null ? (name.contains(" ") ? name.toLowerCase().replaceAll(" ", "_") : name.toLowerCase()) : null;/* w w w . j a v a 2 s .c o m*/ } }