str

Standard library class
class str
@tuple
class str
Constructors 4
__new__
@__internal__
__new__(p: Ptr[u8], l: int)
__new__
__new__()
__new__
__new__(data: bytes, encoding: str, errors: str = "strict")
__new__
__new__(what)
Methods 53
format
format(self, *values)
format_map
format_map(self, mapping)
from_ptr
from_ptr(t: cobj)
find
find(self, sub: str)
find(self, sub: str, start: int)
find(self, sub: str, start: int, end: int)
rfind
rfind(self, sub: str)
rfind(self, sub: str, start: int)
rfind(self, sub: str, start: int, end: int)
index
index(self, sub: str)
index(self, sub: str, start: int)
index(self, sub: str, start: int, end: int)
rindex
rindex(self, sub: str)
rindex(self, sub: str, start: int)
rindex(self, sub: str, start: int, end: int)
count
count(self, sub: str)
count(self, sub: str, start: int)
count(self, sub: str, start: int, end: int)
startswith
startswith(self, prefix: str)
startswith(self, prefix: str, start: int)
startswith(self, prefix: str, start: int, end: int)
endswith
endswith(self, suffix: str)
endswith(self, suffix: str, start: int)
endswith(self, suffix: str, start: int, end: int)
encode
encode(self, encoding: str = "utf-8", errors: str = "strict")
c_str
c_str(self)
maketrans
@staticmethod
maketrans(x: OrderedDict[int, int])
maketrans(x: OrderedDict[int, str])
maketrans(x: OrderedDict[int, Optional[int]])
maketrans(x: OrderedDict[int, Optional[str]])
maketrans(x: str, y: str)
maketrans(x: str, y: str, z: str)
translate
translate(self, table: OrderedDict[int, int])
translate(self, table: OrderedDict[int, str])
translate(self, table: OrderedDict[int, Optional[int]])
translate(self, table: OrderedDict[int, Optional[str]])
lower
lower(self)
upper
upper(self)
casefold
casefold(self)
capitalize
capitalize(self)
title
title(self)
swapcase
swapcase(self)
removeprefix
removeprefix(self, prefix: str)
removesuffix
removesuffix(self, suffix: str)
strip
strip(self, chars: Optional[str] = None)
lstrip
lstrip(self, chars: Optional[str] = None)
rstrip
rstrip(self, chars: Optional[str] = None)
split
split(self, sep: Optional[str] = None, maxsplit: int = -1)
rsplit
rsplit(self, sep: Optional[str] = None, maxsplit: int = -1)
splitlines
splitlines(self, keepends: bool = False)
join
join(self, values)
join(self, values: List[str])
replace
replace(self, old: str, new: str, count: int = -1)
center
center(self, width: int)
center(self, width: int, fillchar: str)
ljust
ljust(self, width: int)
ljust(self, width: int, fillchar: str)
rjust
rjust(self, width: int)
rjust(self, width: int, fillchar: str)
zfill
zfill(self, width: int)
expandtabs
expandtabs(self, tabsize: int = 8)
isalnum
isalnum(self)
isalpha
isalpha(self)
isdigit
isdigit(self)
isspace
isspace(self)
isascii
isascii(self)
islower
islower(self)
isupper
isupper(self)
istitle
istitle(self)
isnumeric
isnumeric(self)
isdecimal
isdecimal(self)
isprintable
isprintable(self)
isidentifier
isidentifier(self)
partition
partition(self, sep: str)
rpartition
rpartition(self, sep: str)
cat
cat(*args)
memcpy
@llvm
memcpy(dest: Ptr[u8], src: Ptr[u8], len: int)
declare void @llvm.memcpy.p0i8.p0i8.i64(ptr %dest, ptr %src, i64 %len, i32 %align, i1 %isvolatile)
call void @llvm.memcpy.p0i8.p0i8.i64(ptr %dest, ptr %src, i64 %len, i32 0, i1 false)
ret {} {}
memmove
@llvm
memmove(dest: Ptr[u8], src: Ptr[u8], len: int)
declare void @llvm.memmove.p0i8.p0i8.i64(ptr %dest, ptr %src, i64 %len, i32 %align, i1 %isvolatile)
call void @llvm.memmove.p0i8.p0i8.i64(ptr %dest, ptr %src, i64 %len, i32 0, i1 false)
ret {} {}
memset
@llvm
memset(dest: Ptr[u8], val: u8, len: int)
declare void @llvm.memset.p0i8.i64(ptr %dest, i8 %val, i64 %len, i32 %align, i1 %isvolatile)
call void @llvm.memset.p0i8.i64(ptr %dest, i8 %val, i64 %len, i32 0, i1 false)
ret {} {}
Special methods 30
__to_py__
__to_py__(self)
__from_py__
__from_py__(s: cobj)
__format__
__format__(self, format_spec: str)
__mod__
__mod__(self, values)
__to_gpu__
__to_gpu__(self, cache: AllocCache)
Added by internal.gpu
__from_gpu__
__from_gpu__(self, other: str)
Added by internal.gpu
__from_gpu_new__
__from_gpu_new__(other: str)
Added by internal.gpu
__len__
__len__(self)
__bool__
__bool__(self)
__match__
__match__(self, other: str)
__getitem__
__getitem__(self, item: int)
__getitem__(self, item: Slice[int, int, int])
__eq__
__eq__(self, other: str)
__ne__
__ne__(self, other: str)
__lt__
__lt__(self, other: str)
__le__
__le__(self, other: str)
__gt__
__gt__(self, other: str)
__ge__
__ge__(self, other: str)
__add__
__add__(self, other: str)
__mul__
__mul__(self, count: int)
__rmul__
__rmul__(self, count: int)
__repr__
__repr__(self)
__str__
__str__(self)
__contains__
__contains__(self, sub: str)
__copy__
__copy__(self)
__deepcopy__
__deepcopy__(self)
__ptrcopy__
__ptrcopy__(self)
__hash__
__hash__(self)
__iter__
__iter__(self)
__pickle__
__pickle__(self, jar: Jar)
Added by pickle
__unpickle__
__unpickle__(jar: Jar)
Added by pickle