summaryrefslogtreecommitdiff
path: root/osdep/OSUtils.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-11-18 15:49:28 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-11-18 15:49:28 -0800
commitccdd4ffda70a35219fae1cdce1306f3d4ebd8dc9 (patch)
treedabf33f54a180293cd44961a9b9b557fe8fae4de /osdep/OSUtils.hpp
parent673c0c811ea443c217b3a4ca17eeaed3ab596501 (diff)
downloadinfinitytier-ccdd4ffda70a35219fae1cdce1306f3d4ebd8dc9.tar.gz
infinitytier-ccdd4ffda70a35219fae1cdce1306f3d4ebd8dc9.zip
Move split() to OSUtils since it is not used in core.
Diffstat (limited to 'osdep/OSUtils.hpp')
-rw-r--r--osdep/OSUtils.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/osdep/OSUtils.hpp b/osdep/OSUtils.hpp
index c481780b..c73f0bd3 100644
--- a/osdep/OSUtils.hpp
+++ b/osdep/OSUtils.hpp
@@ -237,6 +237,17 @@ public:
static bool writeFile(const char *path,const void *buf,unsigned int len);
/**
+ * Split a string by delimiter, with optional escape and quote characters
+ *
+ * @param s String to split
+ * @param sep One or more separators
+ * @param esc Zero or more escape characters
+ * @param quot Zero or more quote characters
+ * @return Vector of tokens
+ */
+ static std::vector<std::string> split(const char *s,const char *const sep,const char *esc,const char *quot);
+
+ /**
* Write a block of data to disk, replacing any current file contents
*
* @param path Path to write