Skip to main content

parse

Function parse 

Source
pub fn parse(line: &[u8]) -> Option<Shebang>
Expand description

Parses the payload of a #! line (without the #!, without newline).

Leading blanks are skipped, the interpreter runs until the next blank, and the remainder, trimmed at both ends, becomes a single argument, exactly like fs/binfmt_script.c.

§Arguments

  • line - Bytes after #!, at most 255.

§Returns

The parsed Shebang, or None when no interpreter is present.