A very simple text truncating function.
pip install elide-text
from elidetext import elide_text
text = elide_text("A brand new tool devoted to complex neuron models", 25)
print(text) #=> A brand new tool devotedโฆ
text = elide_text("๐บ๐ฐ๐๐ฎ๐ต๐ด๐ฏ๐ฟ๐๐๐", 6)
print(text) #=> ๐บ๐ฐ๐๐ฎ๐ตโฆ
Contributions are always welcome.
See Contributing.
The MIT License (MIT)