src/pylib/stringlib/meth

Search:
Group by:
Source   Edit  

Procs

func center[S](a: S; width: int; fillchar = ' '): S
Mimics Python str.center(width: int, fillchar: str=" ") -> str Source   Edit  
func center[S](a: S; width: int; fillchar: S = " "): S
Source   Edit  
func count[S](a: S; sub: S): int
Source   Edit  
func count[S](a: S; sub: S; start = 0; end: int): int
Source   Edit  
func count[S](a: S; sub: S; start: int): int
Source   Edit  
func endsWith[S; Suf: S | tuple](a: S; suffix: Suf; start, end: int): bool
Source   Edit  
func endsWith[S; Suf: S | tuple](a: S; suffix: Suf; start: int): bool
Source   Edit  
func endsWith[S; Tup: tuple](a: S; suffix: Tup): bool
Source   Edit  
func find[S; T](a: S; b: T; start = 0): int
Source   Edit  
func find[S; T](a: S; b: T; start = 0; end: int): int
Source   Edit  
func find1[S; T](a: S; b: T; start = 0): int
b shall be one length long. Source   Edit  
func find1[S; T](a: S; b: T; start = 0; end: int): int
b shall be one length long. Source   Edit  
func index[S; T](a: S; b: T; start = 0): int
Source   Edit  
func index[S; T](a: S; b: T; start = 0; end: int): int
Source   Edit  
func index1[S; T](a: S; b: T; start = 0): int
Source   Edit  
func index1[S; T](a: S; b: T; start = 0; end: int): int
Source   Edit  
func isalnum(c: char): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func isalnum(s: string): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func isalpha(c: char): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func isalpha(s: string): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func isascii(c: char): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func isascii(s: string): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func isdigit(c: char): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func isdigit(s: string): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func isspace(c: char): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func isspace(s: string): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func join[T, S](sep: S; a: openArray[T]): S
Mimics Python join() -> string Source   Edit  
func join[T](sep: char; a: openArray[T]): string
Source   Edit  
func ljust(a: string; width: int; fillchar = ' '): string {....raises: [],
    tags: [], forbids: [].}
Source   Edit  
func ljust[S](a: S; width: int; fillchar: S = " "): S
Source   Edit  
func partition[S](a: S; sep: S): tuple[before, sep, after: S]
Source   Edit  
func removeprefix[S](a: S; suffix: S): S
Source   Edit  
func removesuffix[S](a: S; suffix: S): S
Source   Edit  
func replace[S](a: S; sub, by: char): S
Source   Edit  
func replace[S](a: S; sub, by: char; count: int): S
Source   Edit  
func replace[S](a: S; sub, by: S): S
Source   Edit  
func replace[S](a: S; sub, by: S; count: int): S
Source   Edit  
func rfind[S; T](a: S; b: T; start = 0): int
Source   Edit  
func rfind[S; T](a: S; b: T; start = 0; end: int): int
Source   Edit  
func rfind1[S; T](a: S; b: T; start = 0): int
Source   Edit  
func rfind1[S; T](a: S; b: T; start = 0; end: int): int
Source   Edit  
func rindex[S; T](a: S; b: T; start = 0): int
Source   Edit  
func rindex[S; T](a: S; b: T; start = 0; end: int): int
Source   Edit  
func rindex1[S; T](a: S; b: T; start = 0): int
Source   Edit  
func rindex1[S; T](a: S; b: T; start = 0; end: int): int
Source   Edit  
func rjust(a: string; width: int; fillchar = ' '): string {....raises: [],
    tags: [], forbids: [].}
Source   Edit  
func rjust[S](a: S; width: int; fillchar: S = " "): S
Source   Edit  
func rpartition[S](a: S; sep: S): tuple[before, sep, after: S]
Source   Edit  
func startsWith[S; Suf: S | tuple](a: S; suffix: Suf; start, end: int): bool
Source   Edit  
func startsWith[S; Suf: S | tuple](a: S; suffix: Suf; start: int): bool
Source   Edit  
func startsWith[S; Tup: tuple](a: S; suffix: Tup): bool
Source   Edit  
func zfill(a: string; width: int): string {....raises: [], tags: [], forbids: [].}
Source   Edit  
func zfill(c: char; width: int): string {....raises: [], tags: [], forbids: [].}
Source   Edit  

Templates

template allAlpha(a, isWhat, isNotWhat: typed; iter, firstItemGetter)
used as func body. e.g. func isupper(self: PyBytes): bool = self.allAlpha(isUpperAscii, isLowerAscii, items, [0]) Source   Edit  
template endsWith[S](a: char; suffix: S): bool
Source   Edit  
template endsWith[S](a: S; suffix: char): bool
Source   Edit  
template expandtabsImpl[S](a: S; tabsize: int; strByteLen: int; iter): string
Source   Edit  
template istitleImpl(a, isupper, islower: typed; iter, firstItemGetter)
Source   Edit  
template startsWith[S](a: char; suffix: S): bool
Source   Edit  
template startsWith[S](a: S; suffix: char): bool
Source   Edit