Function autocomplete

  • Check if a partial string autocompletes to another string.

    Parameters

    • partial: string

      A short string.

    • target: string

      A longer string to compare against.

    Returns boolean

    If the partial matches the target string, return true; otherwise return false.