Mercurial > repos > aaronquinlan > multi_intersect
comparison BEDTools-Version-2.14.3/src/utils/Fasta/split.h @ 0:dfcd8b6c1bda
Uploaded
author | aaronquinlan |
---|---|
date | Thu, 03 Nov 2011 10:25:04 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:dfcd8b6c1bda |
---|---|
1 #ifndef __SPLIT_H | |
2 #define __SPLIT_H | |
3 | |
4 // functions to split a string by a specific delimiter | |
5 #include <string> | |
6 #include <vector> | |
7 #include <sstream> | |
8 #include <string.h> | |
9 | |
10 // thanks to Evan Teran, http://stackoverflow.com/questions/236129/how-to-split-a-string/236803#236803 | |
11 | |
12 // split a string on a single delimiter character (delim) | |
13 std::vector<std::string>& split(const std::string &s, char delim, std::vector<std::string> &elems); | |
14 std::vector<std::string> split(const std::string &s, char delim); | |
15 | |
16 // split a string on any character found in the string of delimiters (delims) | |
17 std::vector<std::string>& split(const std::string &s, const std::string& delims, std::vector<std::string> &elems); | |
18 std::vector<std::string> split(const std::string &s, const std::string& delims); | |
19 | |
20 #endif |