use fields instead of split to split on all whitespace
This commit is contained in:
parent
6d2293685f
commit
b1fc251574
|
|
@ -22,7 +22,8 @@ import "core:strings"
|
|||
getSpaceDelimetedItems :: proc(backingBuffer: []byte) -> []string {
|
||||
count, _ := os.read(os.stdin, backingBuffer)
|
||||
response := string(backingBuffer[:count - 1]) // leave off the newline
|
||||
items, _ := strings.split(response, " ")
|
||||
strings.trim_space(response)
|
||||
items, _ := strings.fields(response)
|
||||
return items
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue