# 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>              |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dbnetsoft.com/dbnetsoft/knowledge-base/scriban-scripting/functions/custom-standard-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
