Custom Standard Functions

Scripting also provides the following custom functions.

MethodParametersDescription

FormatRaceResult

<timespan> "<format>"

Converts a given timespan or datetime and formats it using RaceResult12 formating syntax. Example: {{ Runtime | FormatRaceResult "Hh:mm:ss,k" }} produces 2:55:87,7.

TrimPad

<string> <length> "<alignment>"

Trims the or pads the given string to always be as long as length and aligns it by the alignment values ("Left", "Right", "Center") Example: {{ "Hallo, this text is too long" | TrimPad 8 "Center" }} produces Hallo, t.

ToTimeSpan

<object>

Converts any object to a timespan, e.g. number of seconds provided by raceresult

RemoveAccents

<string>

Removes all accents on the given string Example: {{ "Tobìas Däuber" | RemoveAccents }} produces Tobias Dauber

Last updated