add method emptyToNull

This commit is contained in:
2024-12-13 10:56:58 -06:00
parent 21a5c98376
commit 5070f0a738
2 changed files with 30 additions and 0 deletions

View File

@ -460,4 +460,19 @@ public class StringUtils
return (Pattern.matches("[a-f0-9]{8}(?:-[a-f0-9]{4}){4}[a-f0-9]{8}", s));
}
/***************************************************************************
**
***************************************************************************/
public static String emptyToNull(String s)
{
if(!hasContent(s))
{
return (null);
}
return (s);
}
}