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.1.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.1-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file split-nth-0.1.1.tar.gz.

File metadata

  • Download URL: split-nth-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 7054880a65979c56d23d8dd551137a63a4bfd599da85140367a6a6dea6101549
MD5 51f8e737b4611623bdbe3569645518cb
BLAKE2b-256 6fe1a1659157a48f572349597bad532f4128d39da2e4d58c5a6ec16a1bee7912

See more details on using hashes here.

File details

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

File metadata

  • Download URL: split_nth-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0611c78737ae39a93fcbdcbea13ab8610a62a7f23192cfc62300adb906167091
MD5 6df09b4b72a55cef420110a83a45602e
BLAKE2b-256 0c2adf9a55e89d9d45232a04ec5694f22529f7ba6ce62423872a92c38b7281b1

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