Function getLineStartingAsArray

  • Searches a multi-line string and returns the first line begining with the specified prefix as a string array. The return array is created by removing the prefix from the beginning-of-line and splitting the rest of the line at each space character.

    Parameters

    • str: string

      The string to be searched.

    • prefix: string

      The string to locate at the beginning of a line.

    Returns string[]

    The requested line as a string array. The array is empty if the prefix was not located.