Skip to content

enum list - doesn't handle an empty list #4

@martinsumner

Description

@martinsumner

This uses string:split/3 - but what if it is a list of 0 or more atoms, not 1 or more:

1> string:split("a,b,c",",",all).
["a","b","c"]
2> string:split("a",",",all).
["a"]
3> string:split("",",",all).
[[]]

If it uses string:lexemes/2 ...

5> string:lexemes("a,b,c",",").
["a","b","c"]
6> string:lexemes("a",",").
["a"]
7> string:lexemes("",",").
[]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions