1
0
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:
Alexander Medvednikov 2020-06-09 10:15:17 +02:00
parent d472a27489
commit 5dcd2303c9

View File

@ -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