Java String Underscore underscoreSpaces(String str)

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

Description

underscore Spaces

License

Apache License

Declaration

public static String underscoreSpaces(String str) 

Method Source Code

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

public class Main {
    public static String underscoreSpaces(String str) {
        if (str == null) {
            return null;
        }/* w  w  w. j av  a2  s.  c o m*/
        str = str.replace(" ", "_");
        return str;
    }
}

Related

  1. underscored(String string)
  2. underscoredToCamel(String string)
  3. underscoreName(String camelCaseName)
  4. underscoreName(String name)
  5. underscoreSpaces(String input)