# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/12_utils.ipynb.

# %% auto 0
__all__ = ['is_asterick', 'is_ellipsis', 'is_upper', 'is_lower', 'remove_quotes', 'remove_whitespace', 'comma_to_comma_',
           'comma__to_comma', 'to_single_spaced_list']

# %% ../nbs/12_utils.ipynb 4
from typing import Any, Tuple
import re, string

# %% ../nbs/12_utils.ipynb 5
from .pttype import PTMeta, PTType

# %% ../nbs/12_utils.ipynb 7
def is_asterick(s: str) -> bool:
    return s == '*'

def is_ellipsis(s: str) -> bool:
    return s == '...'

def is_upper(s:str) -> bool:
    return s in string.ascii_uppercase

def is_lower(s:str) -> bool:
    return s in string.ascii_lowercase

def remove_quotes(s:str) -> str:
    return s.replace('"', '').replace("'", '')

def remove_whitespace(s:str) -> str:
    return s.replace(' ', '')

def comma_to_comma_(s:str) -> str:
    return s.replace(',', ',_')

def comma__to_comma(s:str)->str:
    return s.replace(',_', ', ')

def to_single_spaced_list(s:str) -> str:
    s = comma_to_comma_(s)
    s = remove_whitespace(s)
    s = comma__to_comma(s)
    return s
