Java String Empty to Null emptyToNull(String value)

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

Description

empty To Null

License

Apache License

Declaration

public static String emptyToNull(String value) 

Method Source Code

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

public class Main {
    public static String emptyToNull(String value) {
        if (value.length() == 0) {
            return null;
        }/*from  w ww.j  a  v  a  2  s  .co m*/
        return value;
    }
}

Related

  1. emptyToNull(String str)
  2. emptyToNull(String str)
  3. emptyToNull(String string)
  4. emptyToNull(String text)
  5. emptyToNull(String val)
  6. emptyToString(String str, String returnStr)
  7. isHtmlNull(String str)
  8. nullSafeToString(Object obj)
  9. nvlStr(Object o, String valueIfNull)