internal.types.str
KIND_SHIFT: Literal[int] = 56
LEN_MASK: Literal[int] = ((1 << KIND_SHIFT) - 1)
KIND_MASK: Literal[int] = (3 << KIND_SHIFT)
KIND_ASCII: Literal[int] = 0
KIND_LATIN1: Literal[int] = 1
KIND_UCS2: Literal[int] = 2
KIND_UCS4: Literal[int] = 3
UTF8_CONT_MASK: Literal[int] = 0xC0
UTF8_CONT_TAG: Literal[int] = 0x80
UNICODE_MAX: Literal[int] = 0x10FFFF
SURROGATE_MIN: Literal[int] = 0xD800
SURROGATE_MAX: Literal[int] = 0xDFFF
class str
Extends
internal.core.str · View complete class API →
Constructors
4
Methods
51
startswith(self: Self, prefix, start: Optional[int] = 0, end: Optional[int] = None, /) -> bool
startswith(self: Self, prefix: str, start: Optional[int] = 0, end: Optional[int] = None, /) -> bool
endswith(self: Self, suffix, start: Optional[int] = 0, end: Optional[int] = None, /) -> bool
endswith(self: Self, suffix: str, start: Optional[int] = 0, end: Optional[int] = None, /) -> bool
maketrans(x: dict[(int, int)], /) -> dict[(int, int)]
maketrans(x: dict[(int, str)], /) -> dict[(int, str)]
maketrans(x: dict[(int, Optional[int])], /) -> dict[(int, Optional[int])]
maketrans(x: dict[(int, Optional[str])], /) -> dict[(int, Optional[str])]
maketrans(x: str, y: str, /) -> dict[(int, int)]
maketrans(x: str, y: str, z: str, /) -> dict[(int, Optional[int])]
translate(self: Self, table: dict[(int, int)], /) -> str
translate(self: Self, table: dict[(int, str)], /) -> str
translate(self: Self, table: dict[(int, Optional[int])], /) -> str
translate(self: Self, table: dict[(int, Optional[str])], /) -> str
ljust(self: Self, width: int, /) -> str
ljust(self: Self, width: int, fillchar: str, /) -> str
rjust(self: Self, width: int, /) -> str
rjust(self: Self, width: int, fillchar: str, /) -> str
memcpy(dest: Ptr[u8], src: Ptr[u8], len: int) -> None
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(dest: Ptr[u8], src: Ptr[u8], len: int) -> None
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 {} {}
Special methods
21
__getitem__(self: Self, item: int, /)
__getitem__(self: Self, item: slice[(int, int, int)], /) -> str