[Bro-Dev] [JIRA] (BIT-757) Change split* to return a string_vec rather string_array

Matthias Vallentin (JIRA) jira at bro-tracker.atlassian.net
Mon Jan 19 12:11:00 PST 2015


    [ https://bro-tracker.atlassian.net/browse/BIT-757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19501#comment-19501 ] 

Matthias Vallentin commented on BIT-757:
----------------------------------------

While I'd like to see this feature getting added, I think a new function {{vsplit}} would bloat the API, unless there is good use case for having {{string_set}} as well. I don't see that use case though. Anyone else?

> Change split* to return a string_vec rather string_array
> --------------------------------------------------------
>
>                 Key: BIT-757
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-757
>             Project: Bro Issue Tracker
>          Issue Type: Problem
>          Components: Bro
>    Affects Versions: git/master
>            Reporter: Matthias Vallentin
>              Labels: language
>
> Currently, `{{split}}{{ and friends return a }}{{string_array}}{{, which is a }}{{table[count] of string}}{{. However, these BiFs should return a }}{{string_vec}}{{ or }}{{vector of string}}{{ to allow for sequential iteration over the result. The problem with the current approach is not only that it is wrong modeled (the associative container does not make sense), but also that iteration over the elements, which are obviously ordered, is neither deterministic nor sequential. Presumably this mismatch exists because vectors were not available when the }}{{split*}}` functions have been created.



--
This message was sent by Atlassian JIRA
(v6.4-OD-13-026#64011)


More information about the bro-dev mailing list