method str.slice
Substring of the byte range [a, b); panics unless both are char boundaries.
Example:
fn main() io {
print("hello".slice(1, 3))
}Output
el
pub(api) fn slice(a: usize, b: usize) -> strSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
a | usize |
b | usize |
Returns
str
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/text.oxl:590