Skip to content

Strip String node doesn't properly handle strings of characters #14

@t-ambur

Description

@t-ambur

The strip string node should follow the python3 strip functionality. Currently, it strips whitespace if nothing is provided to the 'Characters' input. If a character is provided to the 'Characters' input, then it properly strips that character from the front and back of the provided String.

The bug is that the node only uses the first character in the 'Characters' input for the strip operation even if a full string is provided. It should instead either follow the 'strip all matching characters' behavior of the python3 libs or should remove matching substrings from the front/back of the string.

Image Image

The python description of split:
https://docs.python.org/3/library/stdtypes.html#str.strip

The relevant node in GraphEx:
https://github.com/mitre/GraphEx/blob/main/graphex/nodes/strings.py#L93

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions