@Tamas_Papp I just saw your https://github.com/tpapp/ByteParsers.jl package (while investigating your GitHub - tpapp/julia-repl: Run an inferior Julia REPL in a terminal inside Emacs package, which as an inveterate Emacs user, is of great interest to me! ) - I think it could benefit from using Strs.jl
instead of (or in addition to) Vector{UInt8}
.
I see that your code currently makes the string be converted to a Vector{UInt8}
, (which may or may not do any real work, depending on the type of the AbstractString
). That would not be necessary with my Str
types.
You would also not be limited to ASCII characters for the delimiter, something that came up recently (see: Unicode related error when reading a .csv - #3 by IljaK91) with somebody trying to use CSV.jl
, because a Python program exported strings with Unicode quotes, i.e.:
‘“’: Unicode U+201c (category Pi: Punctuation, initial quote)
’”’: Unicode U+201d (category Pf: Punctuation, final quote)
You could use any of the CodeUnitSingle
Str
types (currently all of them except for UTF8Str
and UTF16Str
), such as UniStr
, BinaryStr
, RawByteStr
, RawWordStr
, RawCharStr
, etc.