Skip to main content

kernel_value

Function kernel_value 

Source
pub fn kernel_value(raw: &str) -> String
Expand description

What: A kernel argument value without the quote that opens it and the quote that closes it. Why: The kernel strips a leading quote from a value and a trailing one when the value had a leading one; quotes inside a value stay (they only toggled the splitting). The option check reads this form.

In TS you’d write (pseudocode):

const kernelValue = (raw: string) => raw.startsWith('"') ? raw.slice(1).replace(/"$/, '') : raw;