Skip to main content

from_utf8

Function from_utf8 

Source
pub fn from_utf8(str: &str) -> Cow<'_, JavaStr>
Expand description

Converts a str into a JavaStr. We avoid copying unless necessary. In the case where there are no four-byte encodings, then no allocation will happen.