mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
system/helpers.cpp: add split_config_string helper
Origin commit data
------------------
Commit: bef1b79bed
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-04-23 (Wed, 23 Apr 2014)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <map>
|
||||
|
||||
int my_system(const char * cmd);
|
||||
int my_system(int argc, const char *arg, ...); /* argc is number of arguments including command */
|
||||
@@ -85,4 +86,5 @@ template<class C> std::string to_string(C i)
|
||||
|
||||
inline void cstrncpy(char *dest, const char * const src, size_t n) { n--; strncpy(dest, src, n); dest[n] = 0; }
|
||||
inline void cstrncpy(char *dest, const std::string &src, size_t n) { n--; strncpy(dest, src.c_str(), n); dest[n] = 0; }
|
||||
bool split_config_string(const std::string &str, std::map<std::string,std::string> &smap);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user