sidpy/base/string_utils.py
def validate_single_string_arg(value, name):
    """
    This function is to be used when validating a SINGLE string parameter for a
    function. Trims the provided value.
    Errors in the string will result in Exceptions

    Parameters
    ----------
    value : str
        Value of the parameter
    name : str
        Name of the parameter

    Returns
    -------
    str
        Cleaned string value of the parameter
    """
    if not isinstance(value, (str, unicode)):
        raise TypeError(name + ' should be a string')
    value = value.strip()
    if len(value) <= 0:
        raise ValueError(name + ' should not be an empty string')
    return value

    This function is to be used when validating a SINGLE string parameter for a
    function. Trims the provided value.
    Errors in the string will result in Exceptions

    Parameters
    ----------
    value : str
        Value of the parameter
    name : str
        Name of the parameter

    Returns
    -------
    str
        Cleaned string value of the parameter
    
This function is to be used when validating a SINGLE string parameter for a
function. Trims the provided value.
Errors in the string will result in Exceptions

Parameters

value : str
Value of the parameter
name : str
Name of the parameter

Returns

str
Cleaned string value of the parameter
This function is to be used when validating a SINGLE string parameter for a function . Trims the provided value . Errors in the string will result in Exceptions Parameters value : str Value of the parameter name : str Name of the parameter Returns str Cleaned string value of the parameter
def validate_single_string_arg(value, name):
    if not isinstance(value, (str, unicode)):
        raise TypeError(name + ' should be a string')
    value = value.strip()
    if len(value) <= 0:
        raise ValueError(name + ' should not be an empty string')
    return value
def validate_single_string_arg ( value , name ) : if not isinstance ( value , ( str , unicode ) ) : raise TypeError ( name + ' should be a string' ) value = value . strip ( ) if len ( value ) <= 0 : raise ValueError ( name + ' should not be an empty string' ) return value
This function is to be used when validating a SINGLE string parameter for a
function.
This function is to be used when validating a SINGLE string parameter for a function .
"""
    This function is to be used when validating a SINGLE string parameter for a
    function. Trims the provided value.
    Errors in the string will result in Exceptions

    Parameters
    ----------
    value : str
        Value of the parameter
    name : str
        Name of the parameter

    Returns
    -------
    str
        Cleaned string value of the parameter
    """
value
name