Skip to content

Commit 679cb42

Browse files
committed
updated remove function
1 parent 70fabbd commit 679cb42

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

string_py/string_py.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,14 @@ def generate(self, length: int = None, min_: int = None, max_: int = None) -> st
130130
else:
131131
raise AttributeError("min_ and max_ or length must have a value")
132132

133-
def remove(self, chars: str | list[str]) -> str:
133+
def remove(self, *chars: str) -> str:
134134
"""Remove chars from string
135135
136136
Parameters:
137137
-----------
138138
:param chars:
139139
The chars you want to remove
140140
"""
141-
if type(chars) is str:
142-
list(chars)
143141
for x in chars:
144142
self.values = self.values.replace(x, "")
145143
return self.values
@@ -198,7 +196,6 @@ def last(self, length: int = 1, remove=False) -> str:
198196
return self.values[-length:]
199197

200198
def __get(self, type_: str, index: bool) -> list[str] | dict[int, str]:
201-
202199
gets = [] if index is False else {}
203200
for num, char in enumerate(self.values):
204201
if char in self.ascii[type_]:

0 commit comments

Comments
 (0)