aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data/text.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/data/text.lux')
-rw-r--r--stdlib/source/lux/data/text.lux18
1 files changed, 9 insertions, 9 deletions
diff --git a/stdlib/source/lux/data/text.lux b/stdlib/source/lux/data/text.lux
index 28679b429..f5462e4e7 100644
--- a/stdlib/source/lux/data/text.lux
+++ b/stdlib/source/lux/data/text.lux
@@ -30,7 +30,7 @@
(def: #export (index-of pattern input)
(-> Text Text (Maybe Nat))
- ("lux text index" input pattern +0))
+ ("lux text index" input pattern |0))
(def: (last-index-of'' part since text)
(-> Text Nat Text (Maybe Nat))
@@ -52,7 +52,7 @@
(def: #export (last-index-of part text)
(-> Text Text (Maybe Nat))
- (case ("lux text index" text part +0)
+ (case ("lux text index" text part |0)
(#.Some since)
(last-index-of'' part since text)
@@ -62,7 +62,7 @@
(def: #export (starts-with? prefix x)
(-> Text Text Bit)
(case (index-of prefix x)
- (#.Some +0)
+ (#.Some |0)
#1
_
@@ -80,7 +80,7 @@
(def: #export (contains? sub text)
(-> Text Text Bit)
- (case ("lux text index" text sub +0)
+ (case ("lux text index" text sub |0)
(#.Some _)
#1
@@ -97,7 +97,7 @@
(def: #export (split at x)
(-> Nat Text (Maybe [Text Text]))
- (case [(..clip +0 at x) (..clip' at x)]
+ (case [(..clip |0 at x) (..clip' at x)]
[(#.Some pre) (#.Some post)]
(#.Some [pre post])
@@ -179,13 +179,13 @@
(:coerce Nat))}
## Platform-independent default.
(let [length ("lux text size" input)]
- (loop [idx +0
- hash +0]
+ (loop [idx |0
+ hash |0]
(if (n/< length idx)
- (let [char (|> idx ("lux text char" input) (maybe.default +0))]
+ (let [char (|> idx ("lux text char" input) (maybe.default |0))]
(recur (inc idx)
(|> hash
- (i64.left-shift +5)
+ (i64.left-shift |5)
(n/- hash)
(n/+ char))))
hash)))))))