This module defines the programming API for String.Slice. The API mostly consists of
functionality for searching for various kinds of pattern matches in slices to iterate over them,
provide subslices according to matches etc. The key design principles behind this module are:
Instead of providing one function per kind of pattern the API is generic over various kinds of patterns. Thus it only provides e.g. one kind of function for looking for the position of the first occurrence of a pattern. Currently the supported patterns are:
StringandString.Slice(partially: doing non trivial searches backwards is not supported yet)
Whenever a slice gets mutated a new slice is returned to allow for repeated chaining of functions with minimal allocations. If necessary the slice can ultimately be converted back to
StringusingString.Slice.copyInstead of allocating intermediate collections the operations that iterate over slices in various ways (characters, positions etc.) return iterators that can be collected into other collections if necessary.
When sensible the API provides functionality for searching both in a forward and backward manner