Transform Reference

String & Case Conversion Verbs

Concatenation, extraction, padding, masking, and case conversion verbs for string manipulation.

String Manipulation

VerbSyntaxDescriptionTry It
concat%concat @p1 "sep" @p2Concatenate values Try
upper%upper @pathUppercase Try
lower%lower @pathLowercase Try
capitalize%capitalize @pathCapitalize first letter Try
titleCase%titleCase @pathTitle Case Each Word Try
trim%trim @pathRemove leading/trailing whitespace Try
substring%substring @path start lenExtract substring (0-based) Try
replace%replace @path "find" "repl"Replace all occurrences Try
padLeft%padLeft @path len "char"Left-pad to length Try
padRight%padRight @path len "char"Right-pad to length Try
truncate%truncate @path lenTruncate to max length Try
mask%mask @path "pattern"Apply format mask (# = digit) Try
split%split @path "delim" indexSplit and take element Try
join%join @array "delim"Join array elements Try
length%length @pathString length Try
contains%contains haystack needleCheck if string contains substring Try
formatPhone%formatPhone @value "countryCode"Format phone number by country code Try

Case Conversion

VerbSyntaxDescriptionTry It
camelCase%camelCase @pathConvert to camelCase (helloWorld) Try
snakeCase%snakeCase @pathConvert to snake_case (hello_world) Try
kebabCase%kebabCase @pathConvert to kebab-case (hello-world) Try
pascalCase%pascalCase @pathConvert to PascalCase (HelloWorld) Try
slugify%slugify @pathConvert to URL-safe slug Try

Reference

Phone Formatting (formatPhone) — Country Codes

Strips non-digit characters from input, then applies the country-specific format. Returns null if digit count doesn't match.

CodeCountryDigitsFormatExample
USUnited States10(XXX) XXX-XXXX(512) 555-1234
CACanada10(XXX) XXX-XXXX(416) 555-1234
GBUnited Kingdom10+44 XX XXXX XXXX+44 20 7123 4567
DEGermany10-11+49 XXX XXXXXXX+49 30 1234567
FRFrance9+33 X XX XX XX XX+33 1 23 45 67 89
AUAustralia9+61 X XXXX XXXX+61 2 1234 5678
JPJapan10+81 X-XXXX-XXXX+81 3-1234-5678

If no country code is provided or unrecognized, returns digits as-is.

Examples

String verb examples
; Concatenation
full_name = %concat @name.first " " @name.last      ; "John Smith"

; Case conversion
state = %upper @address.state                        ; "tx" -> "TX"
name = %capitalize @name.first                       ; "john" -> "John"

; Substring / replace
area_code = %substring @phone ##0 ##3               ; "5125551234" -> "512"
no_dashes = %replace @ssn "-" ""                     ; "123-45-6789" -> "123456789"

; Pad / truncate
seq = %padLeft @sequence ##5 "0"                     ; "42" -> "00042"
short = %truncate @description ##20                  ; Limit to 20 chars

; Mask
phone = %mask @phone "###-###-####"                 ; "5125551234" -> "512-555-1234"

; Phone formatting
us = %formatPhone @phone "US"                        ; "5125551234" -> "(512) 555-1234"
uk = %formatPhone @phone "GB"                        ; "2071234567" -> "+44 20 7123 4567"