StringReduceRight
Run the provided udf over a reversed string to reduce the values to a single output
Method Signature
Arguments
Argument
Type
Required
Description
Default
list
string
true
callback
function:BiFunction
true
The function to invoke for each item. The function will be passed 3 arguments: the value, the index, the array.
initialValue
any
false
The initial value of the reduction
delimiter
string
false
,
includeEmptyFields
boolean
false
false
multiCharacterDelimiter
boolean
false
true
Examples
Simple stringReduceRight Example
Demonstrate how the function works from right to left.
Result: d4c3b2a1
How Do You Do This In Boxlang?
This function will be added to Boxlang in Version 6. But if you need to reverse a string now, use the reverse()
function.
Result: dcba
Related
Last updated
Was this helpful?