Nav

singularize

singularize(String): String

Returns the provided string transformed into its singular form.

Transform

        
     
1
2
3
4
5
6
7
8
9
%dw 2.0
import * from dw::core::Strings
output application/json
---
{
  a: singularize("boxes"),
  b: singularize("wives"),
  c: singularize("feet")
}
Output

        
     
1
2
3
4
5
{
  "a": "box",
  "b": "wife",
  "c": "foot"
}