Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

char boundary

A byte position where one character ends and the next begins.

A char boundary is a byte index at the start of a char, or the string's length; str slicing panics unless both ends are char boundaries (is_char_boundary checks one).

Loading interactive…

Examples

  • In "héllo", byte 2 falls inside é, so &s[0..2] panics while s.get(0..2) returns None.

Read the full section →