Integration Server 10.3 | Built-In Services Reference Guide | String Folder | Summary of Elements in this Folder | pub.string:isNullEmptyOrWhitespace
 
pub.string:isNullEmptyOrWhitespace
WmPublic. Determines if a string is null, empty, or only whitespace.
Input Parameters
inString
String Optional. String to be checked.
ifPresent
Boolean Optional.
*If the value is set to true, the service checks whether inString is present or not, and only then proceeds with validation of the input.
*If the value is set to false, the service throws an exception when inString is absent. Else, the service proceeds to validate the input.
Output Parameters
isNullEmptyOrWhitespace
String Indicates whether inString is null, empty, or only whitespace.
*true indicates that inString has a null value, is empty, or is only whitespace.
*false indicates that inString is not null, not empty, or is not only whitespace.
Examples:
Service with inString = " \t\n\r\n" and ifPresent = true, returns
true
Service with inString=" \t\n\r\n" and ifPresent = false, returns
true
Service with inString = "abcd" and ifPresent = true, returns false
Service with inString = "abcd" and ifPresent = false, returns false
Service with ifPresent = true, returns true
Service with ifPresent = false, throws an exception.
Usage Notes
pub.string:isNullEmptyOrWhitespace replaces pub.string:isNullOrBlank which is deprecated.