Prompt Library (Prompt)
Linked with the "prompt" type.
Example Usage
#[main]
fn main() {
const p = prompt("hello, world", "msg");
assert_eq(p as str, "<msg>hello, world</msg>");
}Prompt.any(prompt: prompt) -> bool
const p = prompt('hello', 'greet');
assert(!p.any());Prompt.at(prompt: prompt, index: int) -> prompt
const p = prompt('hello', 'greet', prompt('hello there'));
const sub = p[0];
assert_eq(sub, prompt('hello there'));Prompt.clear(prompt: prompt) -> void
Prompt.empty(prompt: prompt) -> bool
Prompt.insert(prompt: prompt, index: int, other: prompt) -> void
Prompt.len(prompt: prompt) -> int
Prompt.pop(prompt: prompt) -> prompt
Prompt.prompts(prompt: prompt) -> list
Prompt.push(prompt: prompt, other: prompt | str) -> void
Prompt.remove(prompt: prompt, index: int) -> prompt
Prompt.replace(prompt: prompt, index: int, other: prompt) -> void
Prompt.reverse(prompt: prompt) -> void
Prompt.set_tag(prompt: prompt, tag: str) -> void
Prompt.set_text(prompt: prompt, text: str) -> void
Prompt.str(prompt: prompt) -> str
Prompt.tag(prompt: prompt) -> str
Prompt.text(prompt: prompt) -> str
Last updated