@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
22 lines (21 loc) • 795 B
TypeScript
/**
* Check if the given string starts and ends with the given letter
*/
export declare function startAndEndsWith(str: string, letter: string): boolean;
/**
* Removes all whitespace in the given string
*/
export declare function withoutWhitespace(output: string): string;
/**
* Find the longest common prefix in an array of strings
*/
export declare function longestCommonPrefix(strings: string[]): string;
/**
* Join a list of strings, but with special handling for the last element/scenarios in which the array contains exactly two elements.
* The goal is to create (partial) sentences like `a, b, and c` or `a and b`.
*/
export declare function joinWithLast(strs: readonly string[], { join, last, joinTwo }?: {
join?: string;
last?: string;
joinTwo?: string;
}): string;