mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-20 06:00:44 +00:00
add method emptyToNull
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user