def splitter_fn(delim):
    """Simple string spliter function builder.

    Creates a very simple string splitter function that splits an input string on the given `delim` character, then
    strips whitespace, and yields the resultant values one at a time.

    :param delim: delimiter character (e.g., ',')
    :return: splitter function
    """
    def splitter(s):
        if s:
            for v in s.split(delim):
                yield v.strip()
    return splitter