mise API - v0.0.0
    Preparing search index...

    Function context_split

    • Splits a context string into its type and value components on the first occurrence of a delimiter.

      This function parses strings like "folder:/path/to/folder" or "plugin:123" into an object containing the type (the prefix before the first delimiter) and the value (the rest of the string). If the path contains extra delimiters (e.g. "/pacs/queries/2601_AccessionNumber:12345678"), this function correctly preserves those extra delimiters in the value component.

      Parameters

      • context: unknown

        The context string to be split. Must be a string.

      • delimiter: string = ":"

        The delimiter character to split on. Defaults to ":".

      Returns ContextSpec

      An object conforming to ContextSpec with the split components.

      ChRISContextSpecError If the input is not a string or the delimiter is not found.