string_utils ============ .. py:module:: string_utils Functions --------- .. autoapisummary:: string_utils.list_to_human string_utils.split_camel_case Module Contents --------------- .. py:function:: list_to_human(iterable, conjunction='and', oxford_comma=False) Convert an iterable to a human-readable string. :param iterable: The list of strings to convert to a single natural language string. :type iterable: list or tuple :param conjunction: The conjunction with which to join the last two elements of the list, for example "and" (default). :type conjunction: str, optional :param oxford_comma: If `True`, an "Oxford comma" will be added before the conjunction when there are three or more elements in the list. Default is `False`. :type oxford_comma: bool, optional :rtype: str .. rubric:: Example >>> list_to_human(["sausage", "egg", "chips"]) 'sausage, egg and chips' .. py:function:: split_camel_case(string) Split a CamelCase string into its constituent words. :param string: The string to split by camel case words. :type string: str :rtype: list .. rubric:: Example >>> split_camel_case("ACamelCaseString") ['A', 'Camel', 'Case', 'String']