clarfonthey · GitHub

Feature gate: #![feature(round_char_boundary)]

This is a tracking issue for str::{floor, ceil}_char_boundary.

Public API

impl str {
    // Returns the character boundary at or immediately before `index`
    const fn floor_char_boundary(&self, index: usize) -> usize;
    // Returns the character boundary at or immediately after `index`
    const fn ceil_char_boundary(&self, index: usize) -> usize;
}

Steps / History

Unresolved Questions

Read the original on github.com ↗