8000 Let `"".split()` split according to _any_ whitespace · Issue #86 · abs-lang/abs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Let "".split() split according to _any_ whitespace #86
Closed
@kseistrup

Description

@kseistrup

Python's "".split() method has a useful feature: When invoked without any arguments, the string is split according to any whitespace, and empty strings are discarded from the result:

>>> s = "X Y\tZ"
>>> s.split(" ")
['X', 'Y\tZ']
>>> s.split("\t")
['X Y', 'Z']
>>> s.split()
['X', 'Y', 'Z']

Having a similar logic in ABS would make it much easier to split strings without having to resort to calling .trim() on the resulting elements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0