diff options
author | Brad King <brad.king@kitware.com> | 2002-10-11 14:16:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-10-11 14:16:01 (GMT) |
commit | a8d038dbd0c64a22d35c10c71f4b59da1cadc3f4 (patch) | |
tree | c05672469848d0abde960c8af461216a60341142 /Source/cmSystemTools.h | |
parent | 3d3d7a91469eb0f9bdababe3497849614ac99bb0 (diff) | |
download | CMake-a8d038dbd0c64a22d35c10c71f4b59da1cadc3f4.zip CMake-a8d038dbd0c64a22d35c10c71f4b59da1cadc3f4.tar.gz CMake-a8d038dbd0c64a22d35c10c71f4b59da1cadc3f4.tar.bz2 |
ENH: Added Split method to cmSystemTools to split a string into lines on its newlines.
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r-- | Source/cmSystemTools.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 04806cd..879f5c8 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -218,11 +218,11 @@ public: ///! Find a file in the system PATH, with optional extra paths. static std::string FindFile(const char* name, - const std::vector<std::string>& path= std::vector<std::string>()); + const std::vector<std::string>& path= std::vector<std::string>()); ///! Find an executable in the system PATH, with optional extra paths. static std::string FindProgram(const char* name, - const std::vector<std::string>& path = std::vector<std::string>(), + const std::vector<std::string>& path = std::vector<std::string>(), bool no_system_path = false); ///! Find a library in the system PATH, with optional extra paths. @@ -293,6 +293,10 @@ public: static void EnableRunCommandOutput() {s_DisableRunCommandOutput = false; } static bool GetRunCommandOutput() { return s_DisableRunCommandOutput; } + /** Split a string on its newlines into multiple lines. Returns + false only if the last line stored had no newline. */ + static bool Split(const char* str, std::vector<cmStdString>& lines); + /** * Come constants for different file formats. */ |