For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).
slice
slice(end: Int) -> Slice
Construct slice given the end value.
Args:
- end (
Int): The end value.
Returns:
Slice: The constructed slice.
slice(start: Int, end: Int) -> Slice
Construct slice given the start and end values.
Args:
Returns:
Slice: The constructed slice.
slice(start: Optional[Int], end: Optional[Int], step: Optional[Int]) -> Slice
Construct a Slice given the start, end and step values.
Args:
- start (
Optional[Int]): The start value. - end (
Optional[Int]): The end value. - step (
Optional[Int]): The step value.
Returns:
Slice: The constructed slice.