Skip to main content

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 string
  • slugify() - Convert text to URL-friendly slug
  • capitalize_words() - Capitalize first letter of each word
  • remove_punctuation() - Remove all punctuation
  • remove_whitespace() - Remove all whitespace
  • truncate() - Truncate text to specified length
  • word_count() - Count words in text
  • is_palindrome() - Check if text is a palindrome

License

MIT

Project details


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytextutils-0.1.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

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

Hashes for pytextutils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 12aab2684410da84cc23dfe238843034be246badd11a8335defa8aa59577097a
MD5 af7d2e989c2a38b4a3f9dc7523a07ad0
BLAKE2b-256 900f6f0dbb52c5187a55d50f0e166e1c969d9dfc41d7b3e50d7f52c7ec299352

See more details on using hashes here.

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

Hashes for pytextutils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2f74fa56abc359887ccc486949df5db3c2d0338c414781b1a868dd6ce16e841
MD5 94596e4a1c67546f19b76bff7e6b18f3
BLAKE2b-256 f06e85f93e180548e5d7e89afac6f9c83198cd24e04f031ec41cb7547243b08f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page