Tag: delimiter

About

A delimiter is a sequence of one or more characters used to specify the boundary between separate, independent regions in plain text or other data stream. An example of a delimiter is the comma character in a sequence of comma-separated values.

An alternative to the use of field delimiters is declarative notation, which uses a length field at the start of a region to specify the boundary. For word delimiters used in the written form of human languages, see interword separation.

From en.wikipedia.org/wiki/Delimiter

 

I recently faced a programming challenge that almost broke my brain. I needed to create a function that could explode any single-dimensional array into a full blown tree structure, based on the delimiters found in it's keys. Tricky part was size of the tree could be infinite. I called the function: explodeTree. And maybe it's best to first look at an example.