aboutsummaryrefslogtreecommitdiff
path: root/docs/text.md
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-10-28 13:53:15 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-10-28 13:53:15 -0400
commit9c302fdc34403f46572d9524309617888ba816bb (patch)
tree58ea7faf390536503de114cf2889ed85ba60df7b /docs/text.md
parentc632a72486d347e7ef30c0b7890e2045ed42b903 (diff)
parentce2aebe91085f987aab31bd2a49820fb605cf386 (diff)
Merge branch 'main' into internal-textsinternal-texts
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]
```
---