Can Base.eachsplit help with allocations? Also I think similar things have been discussed previously, for example Performance of splitting string and parsing numbers
UPD: another interesting idea for eachsplit
is Add method `split(str, dlm, ::Val{N})` for allocation-free splitting by jakobnissen 路 Pull Request #43557 路 JuliaLang/julia 路 GitHub
" Good news: NTuple{N}(eachsplit(str, delim))
appears to work for this with no allocation "