mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 18:30:06 +00:00
Replace x in &y Use &v in y syntax through core & vendor for switch/for statements
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user