Skip to content

MivaScript Function Reference#

Functions in MivaScript are blocks of reusable code that perform a specific task. They encapsulate a set of instructions and can accept parameters and return values. This documentation provides an overview of how to define, call, and use functions in MivaScript.

Functions can be used within the <mvt:assign> Miva Template tag.


ltrim Returns a copy of string with all space characters removed from the left end and trim whitespace from arrays and structures. Arrays and structures are iterated and all values within are trimmed appropriately.

<mvt:assign name="g.return_value" value="ltrim( string )" />

A full list of MivaScript functions can be found here: