added string util method for appending strings

This commit is contained in:
Tim Chamberlain
2024-01-16 14:32:40 -06:00
parent 93dcee9f61
commit 00a5b72bf3

View File

@ -176,6 +176,19 @@ public class StringUtils
/*******************************************************************************
** safely appends a string to another, changing empty string if either value is null
**
*******************************************************************************/
public static String safeAppend(String input, String contentToAppend)
{
input = input != null ? input : "";
contentToAppend = contentToAppend != null ? contentToAppend : "";
return input + contentToAppend;
}
/******************************************************************************* /*******************************************************************************
** returns input if not null, or nullOutput if input == null (as in SQL NVL) ** returns input if not null, or nullOutput if input == null (as in SQL NVL)
** **