mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: fix string.fields()
This commit is contained in:
parent
d472a27489
commit
5dcd2303c9
@ -1345,7 +1345,8 @@ pub fn (s string) repeat(count int) string {
|
||||
}
|
||||
|
||||
pub fn (s string) fields() []string {
|
||||
return s.split(' ')
|
||||
// TODO do this in a better way
|
||||
return s.replace('\t', ' ').split(' ')
|
||||
}
|
||||
|
||||
// Allows multi-line strings to be formatted in a way that removes white-space
|
||||
|
Loading…
Reference in New Issue
Block a user