builtin: fix string.fields()

pull/5297/head
Alexander Medvednikov 2020-06-09 10:15:17 +02:00
parent d472a27489
commit 5dcd2303c9
1 changed files with 2 additions and 1 deletions

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