Skip to main content

Split strings at the N-th occurrence of a word

Project description

split-nth

A small utility to split a string at the N-th occurrence of a specific word.

Installation

pip install split_nth


##Usage
from split_nth import split_on_word

s = "cast (int as dec) as abcas"
print(split_on_word(s, word="as", occ=2))
# Output: ['cast (int as dec)', 'abcas']

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

split_nth-0.1.2.tar.gz (1.6 kB view details)

Uploaded Source

Built Distribution

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

split_nth-0.1.2-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: split_nth-0.1.2.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for split_nth-0.1.2.tar.gz
Algorithm Hash digest
SHA256 73b161cd89d0ea4a6bc1b4d913c8aead66f7b046299a826eec54b67829dd297a
MD5 1e0668ca1d58e628f264e274d623c898
BLAKE2b-256 70146443d6d24fb219508707a7dd14520d6073149ee19e34b026f2e9e36efa9c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: split_nth-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 1.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for split_nth-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6d383e9503aab8d1965dc1ee0f442c0b4e22770bb18c9975510204a41272d2a2
MD5 57e49434e6a3dd1f4ab086b7d4f4e9f0
BLAKE2b-256 d1296a5199d8abf774eac7b7a9554ec4b84ff9ae3172c116e1e0d2dc322ec661

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