Thread overview
tango.text.util delimit
Jun 13, 2013
seany
Jun 13, 2013
Jacob Carlborg
Jun 13, 2013
seany
June 13, 2013
The delimit function in tango, called by auto w = delimit(complex_str, del_chars), uses each char in the string del_chars as a delimiting character to split complex_str.

however, i need to parse a bit of latex, and would love to know, if it is possbile to parse a string, whose "components" are delimited by another string.

eg:

a && b && c && d\\ e && f && f && g\\

this string has the components ... a ...g and they are delimited by \\ or && (two char long strings)

does tango provide a function for that?

sorry if i missed the answer where i should have looked

June 13, 2013
On 2013-06-13 15:46, seany wrote:
> The delimit function in tango, called by auto w = delimit(complex_str,
> del_chars), uses each char in the string del_chars as a delimiting
> character to split complex_str.
>
> however, i need to parse a bit of latex, and would love to know, if it
> is possbile to parse a string, whose "components" are delimited by
> another string.
>
> eg:
>
> a && b && c && d\\ e && f && f && g\\
>
> this string has the components ... a ...g and they are delimited by \\
> or && (two char long strings)
>
> does tango provide a function for that?
>
> sorry if i missed the answer where i should have looked

Is tango.text.Util.split what you are looking for?

http://www.dsource.org/projects/tango/docs/current/tango.text.Util.html#split

-- 
/Jacob Carlborg
June 13, 2013
On Thursday, 13 June 2013 at 13:53:33 UTC, Jacob Carlborg wrote:

>
> Is tango.text.Util.split what you are looking for?
>
> http://www.dsource.org/projects/tango/docs/current/tango.text.Util.html#split

thanks, my day is made, packaged, and delivered :)