Bentrix Docs
HomePricingDashboard

Assay reference: str — text

runs as written · runs with Bentrix's own convention, said in its note · refused by name, the note says what Bentrix lacks · not yet built.

Functions

str.contains#

runs
str.contains(source: string, str: string) → bool

Whether it contains the text

sourcestringrequired
strstringrequired

str.endswith#

runs
str.endswith(source: string, str: string) → bool

Whether it ends with the text

sourcestringrequired
strstringrequired

str.format#

runs — Bentrix's own convention
str.format(formatString: string, args: any...) → string

{n} replaced by the n-th argument; {n,number,pattern} formats it

formatStringstringrequired
argsany...required

str.format_time#

runs — Bentrix's own convention
str.format_time(time: int, format: string?, timezone: string?) → string

A time on the bench's clock by yyyy MM dd HH mm ss patterns; ISO by default

timeintrequired
formatstringoptional
timezonestringoptional

str.length#

runs
str.length(string: string) → int

The count of characters

stringstringrequired

str.lower#

runs
str.lower(source: string) → string

Lower case

sourcestringrequired

str.match#

runs — Bentrix's own convention
str.match(source: string, regex: string) → string

The first part the expression matches, or an empty string; a regular expression that runs in time linear in the text, so a look-around or a back-reference is refused

sourcestringrequired
regexstringrequired

str.pos#

runs
str.pos(source: string, str: string) → int

The first position of the text; na where absent

sourcestringrequired
strstringrequired

str.repeat#

runs
str.repeat(source: string, repeat: int, separator: string?) → string

The text repeated

sourcestringrequired
repeatintrequired
separatorstringoptional

str.replace#

runs
str.replace(source: string, target: string, replacement: string, occurrence: int?) → string

The occurrence-th instance replaced, counted from 0

sourcestringrequired
targetstringrequired
replacementstringrequired
occurrenceintoptional

str.replace_all#

runs
str.replace_all(source: string, target: string, replacement: string) → string

Every instance replaced

sourcestringrequired
targetstringrequired
replacementstringrequired

str.split#

runs
str.split(string: string, separator: string) → arr<string>

The parts between the separators; an empty separator splits into characters

stringstringrequired
separatorstringrequired

str.startswith#

runs
str.startswith(source: string, str: string) → bool

Whether it begins with the text

sourcestringrequired
strstringrequired

str.substring#

runs
str.substring(source: string, begin_pos: int, end_pos: int?) → string

The characters from begin up to end

sourcestringrequired
begin_posintrequired
end_posintoptional

str.tonumber#

runs
str.tonumber(string: string) → float

A number from text; na where the text is not one

stringstringrequired

str.tostring#

runs — Bentrix's own convention
str.tostring(value: any, format: any?) → string

A number's shortest exact form, or by a format: #, 0 and. Patterns, format.mintick, format.percent, format.volume

valueanyrequired
formatanyoptional

str.trim#

runs
str.trim(source: string) → string

Without the white space at either end

sourcestringrequired

str.upper#

runs
str.upper(source: string) → string

Upper case

sourcestringrequired

Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed