# P0035

`String.slice` was given indices out of bounds: a start or end below 0 or past the text's length in characters, or a start past the end. Spans the call. Indices count characters (Unicode code points), not bytes.

**Machine-applicable fix:** none.

## Example

This program fails with `P0035`.

```oska
fn main() {
    let part = "abc".slice(0, 10)
}
```

## Fixed

The same program, fixed.

```oska
fn main() {
    let part = "abc".slice(0, 2)
}
```

Listed in the [runtime notes](/runtime.md#p0035). `oskac explain P0035` prints this entry offline.