[src]

Function std::str::raw::slice_bytes

pub unsafe fn slice_bytes<'a>(s: &'a str, begin: uint, end: uint) -> &'a str

Takes a bytewise (not UTF-8) slice from a string.

Returns the substring from [begin..end).

Failure

If begin is greater than end. If end is greater than the length of the string.