ycleptic.src.stringthings module¶
Various string manipulation functions for ycleptic
- ycleptic.src.stringthings.dict_to_rst_yaml_block(data: dict) str[source]¶
by ChatGPT 4o on 2025-06-15
- ycleptic.src.stringthings.oxford(a_list: list[str], conjunction: str = 'or')[source]¶
Returns a string with the elements of a_list joined by commas, with the last element preceded by the conjunction. If a_list is empty, returns an empty string. If a_list has one element, returns that element. If a_list has two elements, returns them joined by the conjunction. If a_list has three or more elements, returns all elements joined by commas, with the last element preceded by the conjunction.