def quoteStr(s, addQuotes=False, quoteDouble=False, quoteSingle=True):
    """
    s (str) -- Source string parameter.
    Options:
    - addQuotes (bool|str) -- Add quotes around result string (default: False, don't quote).
    - quoteSingle (bool) -- Quote single quotes ('), default is True.
    - quoteDouble (bool) -- Quote double quotes ("), default is False.
    Returns string.
    """
    if not isinstance(s, str):  # type(s) != str:
        if s is None:
            s = ''
        else:
            s = str(s)
    if quoteDouble:
        s = s.replace('"', '\\"')
    if quoteSingle:
        s = s.replace('\'', '\\\'')
    if addQuotes:
        if addQuotes is True:
            addQuotes = "'"
        s = addQuotes + s + addQuotes
    return s