str_elide

str_elide(long_str, width=80, placeholder='...'): 

LLM Docstring

Truncate a long string to width characters by replacing its middle with a placeholder.

  • long_str: str

    the string to elide

  • width: int

    the maximum width

  • placeholder: str

    the middle placeholder

  • :returns: str

    the elided string


Feedback

Examples

Templates

Documentation