Skip to main content

For replacing multiple characters in a text

Project description

CharStripper

PyPI - Downloads PyPI - License PyPI - Python Version PyPI PyPI - Wheel PyPI - Implementation

This program replaces multiple characters in a text and also optionally lowers it.

Installation

pip install CharStripper

Usage

You can import this script and use it like this:

from CharStripper.core import CharStripper

cs = CharStripper({'o': 'e', 'r': 't', ' ': ''}, True)
cs.strip('Bo aR L  OS')  # returns 'beatles'

CharStripper class takes one mandatory and one optional input.

  • charsDict Gets a dictionary which replaces the dictionary keys with the dictionary values.
  • isLowercase Is a boolean which returns the value lowercased.

After defining the class, you can call cs.strip('YOUR_TEXT_HERE') for every repetition.

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

CharStripper-0.1.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

CharStripper-0.1.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file CharStripper-0.1.2.tar.gz.

File metadata

  • Download URL: CharStripper-0.1.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.0

File hashes

Hashes for CharStripper-0.1.2.tar.gz
Algorithm Hash digest
SHA256 42123909833151f8ce532f481d55f055e8cc1c6f7142207fdff0a26b02eb2ea9
MD5 800fd87b1a7c194b8242a8afc0acd488
BLAKE2b-256 c81ad5a2000612b1243aa805cdc0fcf363efe19bf8c06e0bede5e595082eb8b0

See more details on using hashes here.

File details

Details for the file CharStripper-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for CharStripper-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1f339079f7916701cd8c9f99a2713b603b23b8d93c76d9824248c9a02b55813a
MD5 195564fa6fd1ca2461a817950ef40526
BLAKE2b-256 86b94dd00ef8ff395125e25843a84cc4977d4011dfa92c8b9bb0362afc106b21

See more details on using hashes here.

Supported by

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