blob: 639517bd85c0445ad6ce40f6d36ea5447b9e2809 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH Text.without_prefix 3 2025-04-19T14:52:07.140880 "Tomo man-pages"
.SH NAME
Text.without_prefix \- Returns the text with a given prefix removed (if present).
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Text.without_prefix\ :\ func(text:\ Text,\ prefix:\ Text\ ->\ Text)
.fi
.SH DESCRIPTION
Returns the text with a given prefix removed (if present).
.TS
allbox;
lb lb lbx lb
l l l l.
Name Type Description Default
text Text The text to remove the prefix from. -
prefix Text The prefix to remove. -
.TE
.SH RETURN
A text without the given prefix (if present) or the unmodified text if the prefix is not present.
.SH EXAMPLES
.EX
>> "foo:baz".without_prefix("foo:")
= "baz"
>> "qux".without_prefix("foo:")
= "qux"
.EE
|