Nav

charCode

charCode(String): Number

Returns a Number, representing the unicode of the first character of the specified String. This functions fails if the String is empty

Transform

        
     
1
2
3
4
5
6
7
%dw 2.0
import * from dw::core::Strings
output application/json
---
{
  a: charCode("b")
}
Output

        
     
1
2
3
{
  "a": 98
}