Common string helpers - reverse, slugify, capitalize, remove punctuation
Project description
pytextutils
Common string helpers - reverse, slugify, capitalize, remove punctuation.
Installation
pip install pytextutils
Usage
from pytextutils import reverse_string, slugify, capitalize_words
# Reverse a string
reverse_string("hello") # "olleh"
# Create URL-friendly slug
slugify("Hello World") # "hello-world"
# Capitalize words
capitalize_words("hello world") # "Hello World"
Features
reverse_string()- Reverse a stringslugify()- Convert text to URL-friendly slugcapitalize_words()- Capitalize first letter of each wordremove_punctuation()- Remove all punctuationremove_whitespace()- Remove all whitespacetruncate()- Truncate text to specified lengthword_count()- Count words in textis_palindrome()- Check if text is a palindrome
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytextutils-0.1.0.tar.gz
(2.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytextutils-0.1.0.tar.gz.
File metadata
- Download URL: pytextutils-0.1.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12aab2684410da84cc23dfe238843034be246badd11a8335defa8aa59577097a
|
|
| MD5 |
af7d2e989c2a38b4a3f9dc7523a07ad0
|
|
| BLAKE2b-256 |
900f6f0dbb52c5187a55d50f0e166e1c969d9dfc41d7b3e50d7f52c7ec299352
|
File details
Details for the file pytextutils-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pytextutils-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2f74fa56abc359887ccc486949df5db3c2d0338c414781b1a868dd6ce16e841
|
|
| MD5 |
94596e4a1c67546f19b76bff7e6b18f3
|
|
| BLAKE2b-256 |
f06e85f93e180548e5d7e89afac6f9c83198cd24e04f031ec41cb7547243b08f
|