Metadata-Version: 2.1
Name: stringops
Version: 1.1
Summary: Better String Operations
Author-email: Soumyo Deep Gupta <deep.main.ac@gmail.com>
Maintainer-email: Soumyo Deep Gupta <deep.main.ac@gmail.com>
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.
        
Project-URL: GitHub, https://github.com/d33pster/stringops
Keywords: d33pster,stringops,string,operations,manipulation
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE

# 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
```
