Skip to content

melon.string

garryspins edited this page Feb 27, 2026 · 5 revisions

melon.string


shared link
String manipulation library, think a templating engine Syntax is simple
melon

melon.string.Format("{1} {2} {3}", "first", "second", "third")
melon.string.Format("{1.1}", {"value in a table"})
melon.string.Format("{1.key}", {key = "by a key"})
melon.string.Format("{1.key | uppercase}", {key = "by a key"})
melon.string.Format("{uppercase($1)}", "make this uppercase")
melon.string.Format("the following is escaped: {!uppercase($1)}")  

Members

melon.string.filters

shared link

List of all string filters

Functions

melon.string.CallFil

shared link internal
melon.string.CallFil()

melon.string.Format

shared link
melon.string.Format(fmt: string, args: any...) -> string

Argument and Return information

Arguments

# Name Type Description
1 fmt string String format to use, see [melon.string] for a reference
2 args any... Any values to be passed to the formatter

Returns

# Name Type Description
1 str string Formatted string

Formats a string using the melonlib formatter

melon.string.ParseArgs

shared link internal
melon.string.ParseArgs()

melon.string.Qualify

shared link internal
melon.string.Qualify()

melon.string.QualifyFil

shared link internal
melon.string.QualifyFil()

Extremely unsafe for user input

melon.string.print

shared link
melon.string.print(fmt: string, args: any...)

Argument and Return information

Arguments

# Name Type Description
1 fmt string String to be formatted, see [melon.string] for reference
2 args any... Arguments to be passed to the formatter

Formats and prints the given format, quick function

Clone this wiki locally