diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-20 16:08:16 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-20 16:11:37 +0100 |
| commit | f5f7df7247ae29800e0290774a50942e2485beea (patch) | |
| tree | 57253ba51efdae3ac8e4eea722428924625b514c /library/src/compute/utility.rs | |
| parent | b8ffd3ad3dcaebddbc674e03494e0d818b21fa51 (diff) | |
Documentation
Diffstat (limited to 'library/src/compute/utility.rs')
| -rw-r--r-- | library/src/compute/utility.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/library/src/compute/utility.rs b/library/src/compute/utility.rs index ffad740e..1a3511d0 100644 --- a/library/src/compute/utility.rs +++ b/library/src/compute/utility.rs @@ -3,31 +3,33 @@ use std::str::FromStr; use crate::prelude::*; use crate::text::Case; +/// # Blind Text /// Create blind text. /// -/// # Parameters +/// ## Parameters /// - words: usize (positional, required) /// The length of the blind text in words. /// -/// # Tags -/// - utility +/// ## Category +/// utility #[func] pub fn lorem(args: &mut Args) -> SourceResult<Value> { let words: usize = args.expect("number of words")?; Ok(Value::Str(lipsum::lipsum(words).into())) } +/// # Numbering /// Apply a numbering pattern to a sequence of numbers. /// -/// # Parameters +/// ## Parameters /// - pattern: NumberingPattern (positional, required) /// A string that defines how the numbering works. /// /// - numbers: NonZeroUsize (positional, variadic) /// The numbers to apply the pattern to. /// -/// # Tags -/// - utility +/// ## Category +/// utility #[func] pub fn numbering(args: &mut Args) -> SourceResult<Value> { let pattern = args.expect::<NumberingPattern>("pattern")?; |
