mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-26 07:30:54 +00:00
24 lines
401 B
C++
24 lines
401 B
C++
|
// Copyright (c) 2013 Facebook.
|
||
|
|
||
|
#include <sstream>
|
||
|
#include <string>
|
||
|
#include <vector>
|
||
|
|
||
|
namespace leveldb {
|
||
|
|
||
|
using namespace std;
|
||
|
using std::string;
|
||
|
using std::vector;
|
||
|
using std::stringstream;
|
||
|
|
||
|
vector<string> stringSplit(string arg, char delim) {
|
||
|
vector<string> splits;
|
||
|
stringstream ss(arg);
|
||
|
string item;
|
||
|
while(getline(ss, item, delim)) {
|
||
|
splits.push_back(item);
|
||
|
}
|
||
|
return splits;
|
||
|
}
|
||
|
}
|