Expand

Formatters

Basic Types

:bool convert to bool
@bool convert bool to string
:int convert to int
@int convert int to string
:float convert to float
@float convert float to string
:runes split string into UTF-8 runes, return as list of string
@runes concat list of string
:str must be a string
@str must be a string

Formats

:json parse string as JSON
@json convert a value to a JSON string
:csv parse a CSV line, result is a list
@csv convert a list to a CSV line, result is a string
:columns split a line by spaces AWK-style, result is a list
@columns join a list with a single space, result is string
:yaml TBD
@yaml TBD
:toml TBD
@toml TBD

Delimited Strings

:colons
:commas
:dashes
:dots
:lines
:semicolons
:slashes
:spaces
:tabs
split string by ":" (colon), "," (comma), and so on. Result is a list of string
@colons
@commas
@dashes
@dots
@lines
@semicolons
@slashes
@spaces
@tabs
join list of string by ":" (colon), "," (comma), and so on. Result is string

Durations

:duration parse go-style duration
@duration format duration as string
:days
:hours
:minutes
:seconds
:milliseconds
:microseconds
:nanoseconds
convert a number to duration of corresponding units
@days
@hours
@minutes
@seconds
@milliseconds
@microseconds
@nanoseconds
convert duration to float or int of correspondnig units
:s :ms :µs :ns aliases for :seconds, :milliseconds, :microseconds, :nanoseconds
@s @ms @µs @ns aliases for @seconds, @milliseconds, @microseconds, @nanoseconds

Datetime

:utc
:local
parse "YYYY-MM-DD hh:mm:ss.nnnnnnnnn" format date as UTC or local date correspondingly. Time and nanoseconds are optional.
@utc
@local
represent date as a string

IP

:ip parse string as IP address
@ip convert IP address to a string
:ipnet parse string as IP network (IP/netsize)
@ipnet convert IP network to a string