MCPcopy Create free account
hub / github.com/faern/rustscript / remove_shebang

Function remove_shebang

src/scriptbuilder.rs:109–116  ·  view source on GitHub ↗
(code: &str)

Source from the content-addressed store, hash-verified

107}
108
109fn remove_shebang(code: &str) -> &str {
110 let start = if code.starts_with("#!") {
111 code.find('\n').unwrap_or(code.len())
112 } else {
113 0
114 };
115 &code[start..]
116}
117
118fn extract_extern_crates(code: &str) -> Result<(Vec<CrateImport>, String)> {
119 let regex = create_extern_crate_regex();

Callers 1

format_codeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected