func find(s, sub: cstring; start: Natural = 0; last = 0): int {....raises: [],
tags: [], forbids: [].}Searches for sub in s inside the range start..last (both ends included). If last is unspecified, it defaults to s.high (the last element).
Searching is case-sensitive. If sub is not in s, -1 is returned. Otherwise the index returned is relative to s[0], not start. Use s[start..last].find for a start-origin index.
func find(s: cstring; sub: char; start: Natural = 0; last = 0): int {.
...raises: [], tags: [], forbids: [].}Searches for sub in s inside the range start..last (both ends included). If last is unspecified, it defaults to s.high (the last element).
Searching is case-sensitive. If sub is not in s, -1 is returned. Otherwise the index returned is relative to s[0], not start. Use s[start..last].rfind for a start-origin index.
© 2006–2024 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/strimpl.html