Contents
use php_std::Str;Rust
pub struct Str(Repr)A PHP string: bytes, not necessarily UTF-8.
Three representations, chosen on construction and invisible otherwise:
short strings (up to 23 bytes) are stored inline, string literals borrow
their 'static bytes, and longer strings share a Bytes buffer, so
clones and slices of decoded input never copy.
Also implements
Default, Deref, AsRef, Borrow, PartialEq, PartialOrd, Ord, Hash, Debug, From.