phper 0.2.0

A library that allows us to write PHP extensions using pure Rust and using safe Rust whenever possible.
Documentation
1
2
3
4
5
6
7
8
9
//! Internal useful utils.

pub(crate) fn ensure_end_with_zero(s: impl ToString) -> String {
    let mut s = s.to_string();
    if !s.ends_with('\0') {
        s.push('\0');
    }
    s
}