from typing import List
import re


def split_quoted_string(string_to_split: str, character_to_split_at: str = ",", strip: bool = False) -> List[str]:
    """
    Split a string but obey quoted parts.

    from: "first, string", second string
    to: ['first, string', 'second string']

    Parameters
    ----------
    string_to_split: str
        string to split in parts
    character_to_split_at: int
        character to split the string at
    strip: bool
        strip each part from white spaces
    Returns
    -------
    list: separated string parts
    """

    if not isinstance(string_to_split, str):
        return [string_to_split]

    parts = list()
    for string_part in re.split(rf"{character_to_split_at}(?=(?:[^\"']*[\"'][^\"']*[\"'])*[^\"']*$)", string_to_split):
        if strip is True:
            string_part = string_part.strip()
        parts.append(string_part)

    return parts