mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Squashed 'src/ripple/rocksdb/rocksdb/' content from commit 56589ab
git-subtree-dir: src/ripple/rocksdb/rocksdb
git-subtree-split: 56589ab81f
This commit is contained in:
26
util/string_util.cc
Normal file
26
util/string_util.cc
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright (c) 2013, Facebook, Inc. All rights reserved.
|
||||
// This source code is licensed under the BSD-style license found in the
|
||||
// LICENSE file in the root directory of this source tree. An additional grant
|
||||
// of patent rights can be found in the PATENTS file in the same directory.
|
||||
//
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace rocksdb {
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user