Expression Language
Also available as:
PDF

replaceEmpty

Description: The replaceEmpty function returns the argument if the Subject is null or if the Subject consists only of white space (new line, carriage return, tab, space). Otherwise, returns the Subject.

Subject Type: String

Arguments:

  • Replacement : The value to return if the Subject is null or empty.

Return Type: String

Examples: If the attribute "filename" has the value "a brand new filename.txt" and the attribute "hello" has the value "", then the Expression ${filename:replaceEmpty('abc')} will return "a brand new filename.txt", while ${hello:replaceEmpty('abc')} will return "abc".