aboutsummaryrefslogtreecommitdiff
path: root/docs/text.md
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-10-27 21:14:27 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-10-27 21:14:27 -0400
commitce2aebe91085f987aab31bd2a49820fb605cf386 (patch)
tree9241858c01f68b4eccd2be88f8e12997c885cf46 /docs/text.md
parentefb7be5bc4876c3113041848fb6d901a4f3ab4e9 (diff)
Update docs to reflect deprecation of "&" stack references
Diffstat (limited to 'docs/text.md')
-rw-r--r--docs/text.md12
1 files changed, 2 insertions, 10 deletions
diff --git a/docs/text.md b/docs/text.md
index e8392b8f..7941e6a5 100644
--- a/docs/text.md
+++ b/docs/text.md
@@ -274,7 +274,7 @@ functions that would normally be handled by a more extensive API:
```
Text.has(pattern:Pattern)->Bool
-Text.find(pattern:Pattern, start=1, length=!&Int64?)->Int
+Text.find(pattern:Pattern, start=1)->Int
Text.find_all(pattern:Pattern)->[Text]
Text.matches(pattern:Pattern)->[Text]?
Text.map(pattern:Pattern, fn:func(t:Text)->Text)->Text
@@ -642,7 +642,7 @@ See: [Patterns](#Patterns) for more information on patterns.
**Signature:**
```tomo
-func find(text: Text, pattern: Pattern, start: Int = 1, length: &Int64? = !&Int64 -> Int)
+func find(text: Text, pattern: Pattern, start: Int = 1)
```
**Parameters:**
@@ -650,8 +650,6 @@ func find(text: Text, pattern: Pattern, start: Int = 1, length: &Int64? = !&Int6
- `text`: The text to be searched.
- `pattern`: The pattern to search for.
- `start`: The index to start the search.
-- `length`: If non-null, this pointer's value will be set to the length of the
- match, or `-1` if there is no match.
**Returns:**
`0` if the target pattern is not found, otherwise the index where the match was
@@ -667,12 +665,6 @@ found.
= 2
>> " one two three ":find("{id}", start=5)
= 8
-
->> len := 0[64]
->> " one ":find("{id}", length=&len)
-= 4
->> len
-= 3[64]
```
---