Transform Reference

Type Coercion & Encoding Verbs

Type conversion (string, number, boolean, date), Base64 encoding, URL encoding, and hashing.

Type Coercion

VerbSyntaxDescriptionTry It
coerceString%coerceString @pathConvert to string Try
coerceNumber%coerceNumber @pathConvert to number Try
coerceInteger%coerceInteger @pathConvert to integer Try
coerceBoolean%coerceBoolean @pathConvert to boolean Try
coerceDate%coerceDate @pathConvert to date Try
tryCoerce%tryCoerce @pathAuto-detect and convert type Try

Encoding & Hashing

VerbSyntaxDescriptionTry It
base64Encode%base64Encode @pathEncode to Base64 Try
base64Decode%base64Decode @pathDecode from Base64 Try
urlEncode%urlEncode @pathURL-encode string Try
sha256%sha256 @pathSHA-256 hash Try
md5%md5 @pathMD5 hash Try

Examples

Type coercion examples
; Type conversion
year_str = %coerceString @vehicle.year               ; 2024 -> "2024"
amount = %coerceNumber @premium_text                 ; "1234.50" -> 1234.50
active = %coerceBoolean @is_active                   ; "true" -> true

; Encoding
encoded = %base64Encode @document.content            ; Binary -> Base64
url = %urlEncode @search.query                       ; Spaces -> %20