|
120 | 120 | //! | * | 100 | Product |
|
121 | 121 | //! | / | 100 | Division |
|
122 | 122 | //! | % | 100 | Modulo |
|
123 |
| -//! | + | 95 | Sum | |
| 123 | +//! | + | 95 | Sum or String Concatenation | |
124 | 124 | //! | - | 95 | Difference |
|
125 | 125 | //! | < | 80 | Lower than |
|
126 | 126 | //! | \> | 80 | Greater than |
|
|
197 | 197 | //!
|
198 | 198 | //! This crate offers a set of builtin functions.
|
199 | 199 | //!
|
200 |
| -//! | Identifier | Argument Amount | Description | |
201 |
| -//! |------------|-----------------|-------------| |
202 |
| -//! | min | >= 1 | Returns the minimum of the arguments | |
203 |
| -//! | max | >= 1 | Returns the maximum of the arguments | |
| 200 | +//! | Identifier | Argument Amount | Argument Types | Description | |
| 201 | +//! |------------|-----------------|----------------|-------------| |
| 202 | +//! | `min` | >= 1 | Numeric | Returns the minimum of the arguments | |
| 203 | +//! | `max` | >= 1 | Numeric | Returns the maximum of the arguments | |
| 204 | +//! | `len` | 1 | String | Returns the character length of a string | |
| 205 | +//! | `str::regex_matches` | 2 | String, String | Returns true if the first argument matches the regex in the second argument | |
| 206 | +//! | `str::regex_replace` | 3 | String, String, String | Returns the first argument with all matches of the regex in the second argument replaced by the third argument | |
| 207 | +//! | `str::to_lowercase` | 1 | String | Returns the lower-case version of the string | |
| 208 | +//! | `str::to_uppercase` | 1 | String | Returns the upper-case version of the string | |
| 209 | +//! | `str::trim` | 1 | String | Strips whitespace from the start and the end of the string | |
204 | 210 | //!
|
205 | 211 | //! The `min` and `max` functions can deal with a mixture of integer and floating point arguments.
|
206 |
| -//! They return the result as the type it was passed into the function. |
| 212 | +//! If the maximum or minimum is an integer, then an integer is returned. |
| 213 | +//! Otherwise, a float is returned. |
| 214 | +//! |
| 215 | +//! The regex functions require the feature flag `regex_support`. |
207 | 216 | //!
|
208 | 217 | //! ### Values
|
209 | 218 | //!
|
|
0 commit comments