A simple library to deal with delimited strings that could contain the delimiter in the data itself.
- Split strings by a delimiter and escape the delimiter character if contained in a qualified text field.
- ex.
one,two,"three,four",five
- ex.
fields := qualified.SplitWithQual("Ohhi, mark", ",", "")
fmt.Println(fields) // [Ohhi mark]
- Get a map that contains the length of each field
lens := qualified.FieldLengths("\"Ohhi, mark\",\"Hey bud\"", ",", "\"")
fmt.Println(lens) // map[0:12 1:9]