[−][src]Function gpp::process_str
pub fn process_str(s: &str, context: &mut Context) -> Result<String, LineError>
Process a multi-line string of text.
This function is a wrapper around process_line
. It splits up the text into lines, adding a
newline on the end if there isn't one, and processes it.
It returns either a String representing the final processed text or a LineError if something went wrong.
Examples
assert_eq!(gpp::process_str("#define A 1\n A 2 3 \n", &mut gpp::Context::new()).unwrap(), " 1 2 3 \n");