src/pylib/pybytes/bytesmeth

Search:
Group by:
Source   Edit  

Procs

func capitalize(a: PyBytes): PyBytes {....raises: [], tags: [], forbids: [].}
make the first character have upper case and the rest lower case. Source   Edit  
func center(a: PyBytes; width: int; fillchar = ' '): PyBytes {....raises: [],
    tags: [], forbids: [].}
Mimics Python bytes.center(width: int, fillchar = b" ") -> bytes Source   Edit  
func center(a: PyBytes; width: int; fillchar: PyBytes): PyBytes {.
    ...raises: [TypeError], tags: [], forbids: [].}
Source   Edit  
func contains(a: PyBytes; o: int): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func contains(a: PyBytes; o: PyBytes): bool {.borrow, ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
func count(a: PyBytes; sub: int): int {....raises: [ValueError], tags: [],
                                        forbids: [].}
Source   Edit  
func count(a: PyBytes; sub: int; start = 0; end: int): int {.
    ...raises: [ValueError], tags: [], forbids: [].}
Source   Edit  
func count(a: PyBytes; sub: int; start: int): int {....raises: [ValueError],
    tags: [], forbids: [].}
Source   Edit  
func count(a: PyBytes; sub: PyBytes): int {....raises: [], tags: [], forbids: [].}
Source   Edit  
func count(a: PyBytes; sub: PyBytes; start = 0; end: int): int {....raises: [],
    tags: [], forbids: [].}
Source   Edit  
func count(a: PyBytes; sub: PyBytes; start: int): int {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
func endsWith(a: PyBytes; suffix: char): bool {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
func endsWith(a: PyBytes; suffix: int): bool {....raises: [ValueError], tags: [],
    forbids: [].}
Source   Edit  
func endsWith[Suf: PyBytes | tuple](a: PyBytes; suffix: Suf; start, end: int): bool
Source   Edit  
func endsWith[Suf: PyBytes | tuple](a: PyBytes; suffix: Suf; start: int): bool
Source   Edit  
func endsWith[Tup: tuple](a: PyBytes; suffix: Tup): bool
Source   Edit  
func expandtabs(a: PyBytes; tabsize = 8): PyBytes {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
func find(a: PyBytes; b: int; start = 0; end = len(a)): int {....raises: [],
    tags: [], forbids: [].}
Source   Edit  
func find(a: PyBytes; b: PyBytes; start = 0; end = len(a)): int {....raises: [],
    tags: [], forbids: [].}
Source   Edit  
func index(a: PyBytes; b: int; start = 0; end = len(a)): int {.
    ...raises: [ValueError], tags: [], forbids: [].}
Source   Edit  
func index(a: PyBytes; b: PyBytes; start = 0; end = len(a)): int {.
    ...raises: [Exception], tags: [RootEffect], forbids: [].}
Source   Edit  
func isalpha(a`gensym42: PyBytes): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func isascii(a: PyBytes): bool {....raises: [], tags: [], forbids: [].}
Admonition: since Python 3.7
Source   Edit  
func isdigit(a`gensym43: PyBytes): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func islower(a: PyBytes): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func isspace(a`gensym41: PyBytes): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func istitle(a: PyBytes): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func isupper(a: PyBytes): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func join[T](sep: PyBytes; a: openArray[T]): PyBytes
Mimics Python join() -> bytes Source   Edit  
func ljust(a: PyBytes; width: int; fillchar = ' '): PyBytes {....raises: [],
    tags: [], forbids: [].}
Source   Edit  
func ljust(a: PyBytes; width: int; fillchar: PyBytes): PyBytes {.
    ...raises: [TypeError], tags: [], forbids: [].}
Source   Edit  
func lower(a: PyBytes): PyBytes {....raises: [], tags: [], forbids: [].}
Source   Edit  
func partition(a: PyBytes; sep: PyBytes): tuple[before, sep, after: PyBytes] {.
    ...raises: [ValueError], tags: [], forbids: [].}
Source   Edit  
func removeprefix(a: PyBytes; suffix: PyBytes): PyBytes {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
func removesuffix(a: PyBytes; suffix: PyBytes): PyBytes {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
func replace(a: PyBytes; sub, by: PyBytes | char): PyBytes
Source   Edit  
func replace(a: PyBytes; sub, by: PyBytes | char; count: int): PyBytes

bytes.replace(sub, by, count = -1)'

count may be negative or zero.

Source   Edit  
func rfind(a: PyBytes; b: int; start = 0; end = len(a)): int {....raises: [],
    tags: [], forbids: [].}
Source   Edit  
func rfind(a: PyBytes; b: PyBytes; start = 0; end = len(a)): int {....raises: [],
    tags: [], forbids: [].}
Source   Edit  
func rindex(a: PyBytes; b: int; start = 0; end = len(a)): int {.
    ...raises: [ValueError], tags: [], forbids: [].}
Source   Edit  
func rindex(a: PyBytes; b: PyBytes; start = 0; end = len(a)): int {.
    ...raises: [ValueError], tags: [], forbids: [].}
Source   Edit  
func rjust(a: PyBytes; width: int; fillchar = ' '): PyBytes {....raises: [],
    tags: [], forbids: [].}
Source   Edit  
func rjust(a: PyBytes; width: int; fillchar: PyBytes): PyBytes {.
    ...raises: [TypeError], tags: [], forbids: [].}
Source   Edit  
func rpartition(a: PyBytes; sep: PyBytes): tuple[before, sep, after: PyBytes] {.
    ...raises: [ValueError], tags: [], forbids: [].}
Source   Edit  
func startsWith(a: PyBytes; suffix: char): bool {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
func startsWith(a: PyBytes; suffix: int): bool {....raises: [ValueError], tags: [],
    forbids: [].}
Source   Edit  
func startsWith[Suf: PyBytes | tuple](a: PyBytes; suffix: Suf; start, end: int): bool
Source   Edit  
func startsWith[Suf: PyBytes | tuple](a: PyBytes; suffix: Suf; start: int): bool
Source   Edit  
func startsWith[Tup: tuple](a: PyBytes; suffix: Tup): bool
Source   Edit  
func title(a: PyBytes): PyBytes {....raises: [], tags: [], forbids: [].}
Source   Edit  
func upper(a: PyBytes): PyBytes {....raises: [], tags: [], forbids: [].}
Source   Edit  
func zfill(a: PyBytes; width: int): PyBytes {....raises: [], tags: [], forbids: [].}
Source   Edit  

Templates

template `*`(a: PyBytes; i: int): PyBytes
Source   Edit  
template `*`(i: int; a: PyBytes): PyBytes
Source   Edit  
template casefold(a: PyBytes): PyBytes
Source   Edit