Java String Underscore to underscoresToSpaces(String value)

Here you can find the source of underscoresToSpaces(String value)

Description

underscores To Spaces

License

Apache License

Declaration

public static String underscoresToSpaces(String value) 

Method Source Code

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

public class Main {
    public static String underscoresToSpaces(String value) {
        if (value == null) {
            throw new IllegalArgumentException("Passed value can not be null.");
        }/*from w w  w. j av a 2s  .c o m*/
        return underscoresToSpaces(value, true);
    }

    private static String underscoresToSpaces(String value, boolean all) {
        if (value == null) {
            throw new IllegalArgumentException("Passed value can not be null.");
        }
        if (all) {
            return value.replace("_", " ");
        } else {
            return value.replaceFirst("_", " ");
        }
    }
}

Related

  1. underscore2camel(String underscoreName)
  2. underScore2CamelCase(String strs)
  3. underscoreDashToCamelCase(String s)
  4. underscoresToCamelCaseImpl(String input, boolean capNextLetter)
  5. underscoreToCamel(String input, boolean firstLetterUppercase)
  6. underscoreToCamelCase(String wordConstruct)
  7. underscoreToPascalCase(final String str)
  8. underscoreToSpace(String text)