aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/ADT/StringExtras.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-11-28 22:32:35 +0000
committerChris Lattner <sabre@nondot.org>2006-11-28 22:32:35 +0000
commitd5b58c239e44fe4fa2322900b26c691f5a44bd87 (patch)
tree8782572c65636e039672babf21c9ce952a850532 /include/llvm/ADT/StringExtras.h
parent30579799eda1763201568722dfe1a19dddf3f49f (diff)
Add a helper function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31981 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/StringExtras.h')
-rw-r--r--include/llvm/ADT/StringExtras.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h
index 16132cd880..f0788a1b11 100644
--- a/include/llvm/ADT/StringExtras.h
+++ b/include/llvm/ADT/StringExtras.h
@@ -18,6 +18,7 @@
#include <cctype>
#include <cstdio>
#include <string>
+#include <vector>
namespace llvm {
@@ -129,6 +130,12 @@ static inline bool StringsEqualNoCase(const std::string &LHS,
std::string getToken(std::string &Source,
const char *Delimiters = " \t\n\v\f\r");
+/// SplitString - Split up the specified string according to the specified
+/// delimiters, appending the result fragments to the output list.
+void SplitString(const std::string &Source,
+ std::vector<std::string> &OutFragments,
+ const char *Delimiters = " \t\n\v\f\r");
+
/// UnescapeString - Modify the argument string, turning two character sequences
/// like '\\' 'n' into '\n'. This handles: \e \a \b \f \n \r \t \v \' \\ and
/// \num (where num is a 1-3 byte octal value).