The ``utils.py`` module ======================= .. py:module:: ansys.dpf.core.helpers.utils Summary ------- .. py:currentmodule:: utils .. tab-set:: .. tab-item:: Functions .. list-table:: :header-rows: 0 :widths: auto * - :py:obj:`~indent` - Indent each line of a given text. Description ----------- Provides functions for argument filtering and text indenting. Module detail ------------- .. py:function:: indent(text: Any, subsequent_indent: str = '', initial_indent: Optional[str] = None) -> str Indent each line of a given text. :param text: The input text to be indented. If it is not already a string, it will be converted to one. :type text: Any :param subsequent_indent: The string to prefix all lines of the text after the first line. Default is an empty string. :type subsequent_indent: str, optional :param initial_indent: The string to prefix the first line of the text. If not provided, `subsequent_indent` will be used. :type initial_indent: Optional[str], optional :returns: The indented text with specified prefixes applied to each line. :rtype: str .. rubric:: Examples >>> text = "Hello\\nWorld" >>> print(indent(text, subsequent_indent=" ", initial_indent="--> ")) --> Hello World