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.2.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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73b161cd89d0ea4a6bc1b4d913c8aead66f7b046299a826eec54b67829dd297a
|
|
| MD5 |
1e0668ca1d58e628f264e274d623c898
|
|
| BLAKE2b-256 |
70146443d6d24fb219508707a7dd14520d6073149ee19e34b026f2e9e36efa9c
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d383e9503aab8d1965dc1ee0f442c0b4e22770bb18c9975510204a41272d2a2
|
|
| MD5 |
57e49434e6a3dd1f4ab086b7d4f4e9f0
|
|
| BLAKE2b-256 |
d1296a5199d8abf774eac7b7a9554ec4b84ff9ae3172c116e1e0d2dc322ec661
|