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
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
split-nth-0.1.1.tar.gz
(1.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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7054880a65979c56d23d8dd551137a63a4bfd599da85140367a6a6dea6101549
|
|
| MD5 |
51f8e737b4611623bdbe3569645518cb
|
|
| BLAKE2b-256 |
6fe1a1659157a48f572349597bad532f4128d39da2e4d58c5a6ec16a1bee7912
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0611c78737ae39a93fcbdcbea13ab8610a62a7f23192cfc62300adb906167091
|
|
| MD5 |
6df09b4b72a55cef420110a83a45602e
|
|
| BLAKE2b-256 |
0c2adf9a55e89d9d45232a04ec5694f22529f7ba6ce62423872a92c38b7281b1
|