diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-29 05:06:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-29 05:06:38 +0000 |
commit | 19857d2c05e51936c1cb26aed6d14604a6d44026 (patch) | |
tree | 00211eb78d1d04b1e4274be58824e9bc15113dc6 | |
parent | 9fbff9f66e2611a51a0d79179a6dae6dcabf1fcc (diff) | |
download | bcm5719-llvm-19857d2c05e51936c1cb26aed6d14604a6d44026.tar.gz bcm5719-llvm-19857d2c05e51936c1cb26aed6d14604a6d44026.zip |
add new function
llvm-svn: 10638
-rw-r--r-- | llvm/include/Support/StringExtras.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/include/Support/StringExtras.h b/llvm/include/Support/StringExtras.h index 08e5eb7e041..f491e93b840 100644 --- a/llvm/include/Support/StringExtras.h +++ b/llvm/include/Support/StringExtras.h @@ -97,6 +97,16 @@ static inline std::string ftostr(double V) { return Buffer; } + +/// getToken - This function extracts one token from source, ignoring any +/// leading characters that appear in the Delimiters string, and ending the +/// token at any of the characters that appear in the Delimiters string. If +/// there are no tokens in the source string, an empty string is returned. +/// The Source source string is updated in place to remove the returned string +/// and any delimiter prefix from it. +std::string getToken(std::string &Source, + const char *Delimiters = " \t\n\v\f\r"); + } // End llvm namespace #endif |