Overview
Complex lines of code for manipulating strings are no more.
Table of Contents
Installation
Installation is pretty easy.
pip install stringops
Usage
Manipulation
Import the necessary extended class
from stringops.manipulation import Manipulation
Manipulate -> add
value = "Hey This is me"
value = Manipulation(value)
value = value.add(".")
value = value.add("How are you", "!")
print(value)
Manipulate -> half
value = Manipulation("hey, this is me")
left_half = value.half("left")
right_half = value.half("right")
print(left_half, right_half)
Manipulate -> split
value = Manipulation("hey, this is me")
index_one_value: str = value.split(" ", 1)
all_values: list[str] = value.split(" ", "all")
CONVERT THIS MANIPULATION
OBJECT TO READ
value: Manipulation = Manipulation("hey, this is me")
value: Read = value.convert_to_read()
Read
Importing
from stringops.read import Read
Read - check substring
value = Read("hey, this is me")
if value.there("he"):
return True
else:
return False