Skip to content

Commit d97df3a

Browse files
committed
docs: add truncate helper
1 parent c2e90b0 commit d97df3a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

docs/source/utils/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ Utils
77
suppress_not_modified
88
logging
99
retry
10+
truncate

docs/source/utils/truncate.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
✂️ truncate
2+
=============================
3+
4+
Truncates a string to a given length.
5+
6+
.. code-block:: python
7+
8+
from raito.utils.helpers.truncate import truncate
9+
10+
truncate("Hello, world!", 8) # Returns "Hello..."

0 commit comments

Comments
 (0)