Skip to content

Add built-in for string splitting #768

@mkroetzsch

Description

@mkroetzsch

It would be good if Nemo could feature a built-in for splitting strings along delimiters, similar to split() in common programming languages (e.g., Python). Since we do not have lists so far, there are two modes:

  1. SPLIT(?string,?delimiter,?part) as a bool function that can be used to produce all parts for the given input (requires support for specific unsafe uses of type bool function to generate bindings)
  2. ?part = SPLITPIECE(?string,?delimiter,?index) as a string function that returns exactly the given piece, if there are enough many split pieces to get to this index.

The first would be much more useful in practice. There does not seem to be any SPARQL precedence on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    builtinsIssue related to built-in functionsenhancementNew feature or request

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions