smarts.core.utils.strings module

smarts.core.utils.strings.truncate(str_, length, separator='...')[source]

Truncates a string to the given length by removing internal characters.

Parameters:
  • str – The string to truncate.

  • length – The length to truncate the string to.

  • separator – The intermediary characters that replaces removed characters.