Name | stringops JSON |
Version |
1.1
JSON |
| download |
home_page | None |
Summary | Better String Operations |
upload_time | 2024-07-10 17:41:14 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12 |
license | MIT License Copyright (c) 2024 Soumyo Deep Gupta Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
d33pster
stringops
string
operations
manipulation
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Overview
Complex lines of code for manipulating strings are no more.
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
## Installation
Installation is pretty easy.
```sh
pip install stringops
```
## Usage
### Manipulation
> Import the necessary extended class
```python
from stringops.manipulation import Manipulation
```
> Manipulate -> add
```python
# suppose there is some string say 'value'
value = "Hey This is me"
# I want to add a '.' at the end
value = Manipulation(value)
value = value.add(".")
# I also want to add another sentence to it.
value = value.add("How are you", "!")
# print it
print(value)
```
> Manipulate -> half
```python
# lets take the above variable 'value'.
value = Manipulation("hey, this is me")
# I want to divide the string into half and i want to get the left side of the result.
left_half = value.half("left")
right_half = value.half("right")
print(left_half, right_half)
```
> Manipulate -> split
```python
# using the same varibale 'value'.
value = Manipulation("hey, this is me")
# suppose i want to split the string based on white spaces and
# get the value that is in the index place of 1
# can be done using
# >>> value.split(" ")[1]
index_one_value: str = value.split(" ", 1)
# all the values can also be retrieved
all_values: list[str] = value.split(" ", "all")
```
> CONVERT THIS `MANIPULATION` OBJECT TO `READ`
```python
value: Manipulation = Manipulation("hey, this is me")
value: Read = value.convert_to_read()
```
### Read
> Importing
```python
from stringops.read import Read
```
> Read - check substring
```python
value = Read("hey, this is me")
if value.there("he"):
return True
else:
return False
```
Raw data
{
"_id": null,
"home_page": null,
"name": "stringops",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": "Soumyo Deep Gupta <deep.main.ac@gmail.com>",
"keywords": "d33pster, stringops, string, operations, manipulation",
"author": null,
"author_email": "Soumyo Deep Gupta <deep.main.ac@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/31/f0/77250f5a1aec542556ed07ea4fee96a2687f4d63a39b5655081c00a08d87/stringops-1.1.tar.gz",
"platform": null,
"description": "# Overview\n\nComplex lines of code for manipulating strings are no more.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n\n## Installation\n\nInstallation is pretty easy.\n\n```sh\npip install stringops\n```\n\n## Usage\n\n### Manipulation\n\n> Import the necessary extended class\n\n```python\nfrom stringops.manipulation import Manipulation\n```\n\n> Manipulate -> add\n\n```python\n# suppose there is some string say 'value'\n\nvalue = \"Hey This is me\"\n\n# I want to add a '.' at the end\n\nvalue = Manipulation(value)\nvalue = value.add(\".\")\n\n# I also want to add another sentence to it.\n\nvalue = value.add(\"How are you\", \"!\")\n\n# print it\nprint(value)\n```\n\n> Manipulate -> half\n\n```python\n# lets take the above variable 'value'.\n\nvalue = Manipulation(\"hey, this is me\")\n\n# I want to divide the string into half and i want to get the left side of the result.\n\nleft_half = value.half(\"left\")\nright_half = value.half(\"right\")\n\nprint(left_half, right_half)\n```\n\n> Manipulate -> split\n\n```python\n# using the same varibale 'value'.\n\nvalue = Manipulation(\"hey, this is me\")\n\n# suppose i want to split the string based on white spaces and\n# get the value that is in the index place of 1\n\n# can be done using\n# >>> value.split(\" \")[1]\n\nindex_one_value: str = value.split(\" \", 1)\n\n# all the values can also be retrieved\nall_values: list[str] = value.split(\" \", \"all\")\n```\n\n> CONVERT THIS `MANIPULATION` OBJECT TO `READ`\n\n```python\nvalue: Manipulation = Manipulation(\"hey, this is me\")\nvalue: Read = value.convert_to_read()\n```\n\n### Read\n\n> Importing\n\n```python\nfrom stringops.read import Read\n```\n\n> Read - check substring\n\n```python\nvalue = Read(\"hey, this is me\")\n\nif value.there(\"he\"):\n return True\nelse:\n return False\n```\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Soumyo Deep Gupta Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Better String Operations",
"version": "1.1",
"project_urls": {
"GitHub": "https://github.com/d33pster/stringops"
},
"split_keywords": [
"d33pster",
" stringops",
" string",
" operations",
" manipulation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "41c70ac20c3ba5da23ddcf97f07c740dc1dff4beb478aa15d0de90939e7f1b7b",
"md5": "173de8691152fccddc7a2ce64a22a486",
"sha256": "cb299fb7d1ac2ab3e8d07be8d579bc8068577a7ed7a7b94e192d3b482f98accd"
},
"downloads": -1,
"filename": "stringops-1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "173de8691152fccddc7a2ce64a22a486",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 5426,
"upload_time": "2024-07-10T17:41:12",
"upload_time_iso_8601": "2024-07-10T17:41:12.828357Z",
"url": "https://files.pythonhosted.org/packages/41/c7/0ac20c3ba5da23ddcf97f07c740dc1dff4beb478aa15d0de90939e7f1b7b/stringops-1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "31f077250f5a1aec542556ed07ea4fee96a2687f4d63a39b5655081c00a08d87",
"md5": "26b5962cd8f3dfd13f62d3ba69723963",
"sha256": "9ca7f5e8325fb343f8d408896c0510a5c2aebc5384b51d1d74d01cdb0e5fd8d3"
},
"downloads": -1,
"filename": "stringops-1.1.tar.gz",
"has_sig": false,
"md5_digest": "26b5962cd8f3dfd13f62d3ba69723963",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 4488,
"upload_time": "2024-07-10T17:41:14",
"upload_time_iso_8601": "2024-07-10T17:41:14.518686Z",
"url": "https://files.pythonhosted.org/packages/31/f0/77250f5a1aec542556ed07ea4fee96a2687f4d63a39b5655081c00a08d87/stringops-1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-10 17:41:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "d33pster",
"github_project": "stringops",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "stringops"
}