刘凡 9ff4d1d109 add S3,archive,truncate | %!s(int64=2) %!d(string=hai) anos | |
---|---|---|
.. | ||
.github | %!s(int64=2) %!d(string=hai) anos | |
src | %!s(int64=2) %!d(string=hai) anos | |
tests | %!s(int64=2) %!d(string=hai) anos | |
.editorconfig | %!s(int64=2) %!d(string=hai) anos | |
.flake8 | %!s(int64=2) %!d(string=hai) anos | |
.gitignore | %!s(int64=2) %!d(string=hai) anos | |
CHANGELOG.md | %!s(int64=2) %!d(string=hai) anos | |
CONTRIBUTING.md | %!s(int64=2) %!d(string=hai) anos | |
LICENSE | %!s(int64=2) %!d(string=hai) anos | |
README.md | %!s(int64=2) %!d(string=hai) anos | |
requirements-dev.txt | %!s(int64=2) %!d(string=hai) anos | |
setup.py | %!s(int64=2) %!d(string=hai) anos | |
tox.ini | %!s(int64=2) %!d(string=hai) anos |
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)