Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit 1c94d77

Browse files
committed
run grain format
1 parent 9279f35 commit 1c94d77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/stringutil.gr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export let lastIndexOf = (needle: String, haystack: String) => {
2929
let nlen = String.length(needle)
3030
let i = String.indexOf(revNeedle, rev)
3131
match (i) {
32-
Some(offset) => Some(((String.length(haystack)) - 1) - offset),
32+
Some(offset) => Some(String.length(haystack) - 1 - offset),
3333
None => None,
3434
}
3535
}
@@ -44,7 +44,7 @@ export let afterLast = (needle: String, haystack: String) => {
4444
export let beforeLast = (needle: String, haystack: String) => {
4545
let nlen = String.length(needle)
4646
match (lastIndexOf(needle, haystack)) {
47-
Some(index) => String.slice(0, (index + 1) - nlen, haystack),
47+
Some(index) => String.slice(0, index + 1 - nlen, haystack),
4848
None => haystack,
4949
}
5050
}

0 commit comments

Comments
 (0)