+? multimethod
Methods
- +?(a:Any, b:Any) Source: stdlib.ngs:599
Return a+b unless one of the arguments is falsy. In that case return that argument (a if both are falsy). Useful for building strings with optional parts. Returns
a+b or a or bExample
status_detail = ' (' +? maybe_empty_array.join(',') +? ')' echo("Status: ${main_status}${status_detail}")