# Custom Standard Functions

Scripting also provides the following custom functions.

| Method             | Parameters                                                                             | Description                                                                                                                                                                                                                    |                                                                              |
| ------------------ | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------- |
| `FormatRaceResult` | <p><code>\<timespan></code><br><code>"\<format>"</code></p>                            | <p>Converts a given timespan or datetime and formats it using RaceResult12 formating syntax.<br>Example: <code>{{ Runtime                                                                                                      | FormatRaceResult "Hh:mm:ss,k" }}</code> produces <code>2:55:87,7</code>.</p> |
| `TrimPad`          | <p><code>\<string></code><br><code>\<length></code><br><code>"\<alignment>"</code></p> | 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>`                                                                             | <p>Removes all accents on the given string<br>Example: <code>{{ "Tobìas Däuber"                                                                                                                                                | RemoveAccents }}</code> produces <code>Tobias Dauber</code></p>              |
