pub fn patallocstr(
prog: &Patprog,
string: &str,
stringlen: i32,
unmetalen: i32,
force: i32,
patstralloc: &mut patstralloc,
) -> Option<String>Expand description
Port of char *patallocstr(Patprog prog, char *string, int stringlen, int unmetalen, int force, Patstralloc patstralloc) from
Src/pattern.c:2132.
Sets up patstralloc for a match attempt: when force is set or
the input contains Meta bytes (or PAT_HAS_EXCLUDP demands a
full-path copy), allocates an un-metafied scratch buffer and
stashes pointer/length info on patstralloc. Returns the
allocated buffer or None if no allocation was needed.