pub.string:isNullOrBlank
Checks a string for a null or a blank value.
Input Parameters
inString | String Optional. String to be checked for a null or a blank value. |
ifPresent | Boolean Optional. ![*](chapterTOC_bullet.png) 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. ![*](chapterTOC_bullet.png) 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
isNullorBlank | String Indicates whether or not inString has a null or a blank value. true indicates that inString has either a null or a blank value. false indicates that inString contains a value that is not null. |
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
If inString is not specified, the service considers the string to be blank and returns true.