aboutsummaryrefslogtreecommitdiff
path: root/core/strings/strings.odin
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-06-26 15:42:57 +0100
committergingerBill <bill@gingerbill.org>2023-06-26 15:42:57 +0100
commit3dec55f009da4293aca870d50f7b15668c4bba7c (patch)
tree5a17ea392dd5795831e5104c7c8c5e3496356940 /core/strings/strings.odin
parent00d60e28c2a3e3e3a2e8bf7617bd62c0f9b1aae8 (diff)
Replace `x in &y` Use `&v in y` syntax through core & vendor for `switch`/`for` statements
Diffstat (limited to 'core/strings/strings.odin')
-rw-r--r--core/strings/strings.odin8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/strings/strings.odin b/core/strings/strings.odin
index 6daa5f9c9..66a75f96a 100644
--- a/core/strings/strings.odin
+++ b/core/strings/strings.odin
@@ -1194,7 +1194,7 @@ Output:
split_lines :: proc(s: string, allocator := context.allocator) -> (res: []string, err: mem.Allocator_Error) #optional_allocator_error {
sep :: "\n"
lines := _split(s, sep, 0, -1, allocator) or_return
- for line in &lines {
+ for &line in lines {
line = _trim_cr(line)
}
return lines, nil
@@ -1234,7 +1234,7 @@ Output:
split_lines_n :: proc(s: string, n: int, allocator := context.allocator) -> (res: []string, err: mem.Allocator_Error) #optional_allocator_error {
sep :: "\n"
lines := _split(s, sep, 0, n, allocator) or_return
- for line in &lines {
+ for &line in lines {
line = _trim_cr(line)
}
return lines, nil
@@ -1273,7 +1273,7 @@ Output:
split_lines_after :: proc(s: string, allocator := context.allocator) -> (res: []string, err: mem.Allocator_Error) #optional_allocator_error {
sep :: "\n"
lines := _split(s, sep, len(sep), -1, allocator) or_return
- for line in &lines {
+ for &line in lines {
line = _trim_cr(line)
}
return lines, nil
@@ -1314,7 +1314,7 @@ Output:
split_lines_after_n :: proc(s: string, n: int, allocator := context.allocator) -> (res: []string, err: mem.Allocator_Error) #optional_allocator_error {
sep :: "\n"
lines := _split(s, sep, len(sep), n, allocator) or_return
- for line in &lines {
+ for &line in lines {
line = _trim_cr(line)
}
return lines, nil