Skip to content

String Functions

Some useful string handling functions.

Splitting strings

Split string by newline characters and trims the lines.

local lines = mympd.splitlines(str)

Parameters:

PARAMETER TYPE DESCRIPTION
str string Multiline string to split.

Triming strings

Removes beginning and ending whitespaces from a string.

local trimed = mympd.trim(str)

Parameters:

PARAMETER TYPE DESCRIPTION
str string String to trim.