Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
Work with Racer path containing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
KalitaAlexey committed May 10, 2017
1 parent 5dc7ee5 commit a3b0f4d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 152 deletions.
15 changes: 15 additions & 0 deletions src/Utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Surrounds the specified string by double quotes (").
* Does nothing if the string is already surrounded by them
* @param s The string to surround by double quotes
* @return The string surrounded by double quotes
*/
export function surround_by_double_quotes(s: string): string {
if (!s.startsWith('"')) {
s = '"'.concat(s);
}
if (!s.endsWith('"')) {
s = s.concat('"');
}
return s;
}
Loading

0 comments on commit a3b0f4d

Please sign in to comment.