Here you can find the source of nvl(String string)
Parameter | Description |
---|---|
string | String The source string |
public static String nvl(String string)
//package com.java2s; public class Main { /**//from w w w . j av a2 s.c o m * If the parameter is null, it will return replaceWhenNull string * * @param string String The source string * @param replacementWhenNull String A string used for replacing null * @return String */ public static String nvl(String string, String replacementWhenNull) { if (string == null) { return replacementWhenNull; } return string; } /** * If the parameter is null, it will return no-string value(eg. "") * * @param string String The source string * @return String */ public static String nvl(String string) { return nvl(string, ""); } }