2017-10-25 19:23:32 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
#include "llvm/ADT/StringRef.h"
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Remove double-quotes from the start/end of a string, if present.
|
|
|
|
|
*/
|
|
|
|
|
llvm::StringRef unquoteStr(llvm::StringRef s);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* If `s` starts with `prefix`, remove it. Otherwise, does nothing.
|
|
|
|
|
*/
|
2018-03-12 11:29:03 +05:30
|
|
|
void removePrefixIfPresent(std::string& s, std::string prefix);
|