UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

19 lines (18 loc) 872 B
/** * Just to avoid another library for splitting arguments, we use this module to provide what we need. * * @module */ /** * This splits an input string on the given split string (e.g., ` `), but checks if the string is quoted or escaped. * * Given an input string like `a "b c" d`, with a space character as split, and escapeQuote set to true, * this splits the arguments similar to common shell interpreters (i.e., `a`, `b c`, and `d`). * * When escapeQuote is set to false instead, we keep quotation marks in the result (i.e., `a`, `"b c"`, and `d`.). * * @param inputString - The string to split * @param escapeQuote - Keep quotes in args * @param split - The **single** character to split on (can not be backslash or quote) */ export declare function splitAtEscapeSensitive(inputString: string, escapeQuote?: boolean, split?: string): string[];