Skip to main content

Functions: String

Kahuna provides the following string manipulation functions, allowing you to work efficiently with text values within your scripts:

FunctionDescriptionExample
len(str)Returns the length of the string strlen("hello")5
length(str)Alias for len(str)length("hello")5
lower(str)Converts str to lowercaselower("HELLO")"hello"
upper(str)Converts str to uppercaseupper("hello")"HELLO"
concat(left, right)Concatenates two stringsconcat("hello ", "world")"hello world"
to_json(value)Serializes a value to a JSON stringto_json([1, 2])"[1,2]"

These functions are useful for formatting values, validating inputs, parsing data, and handling dynamic key names in Kahuna Scripts.