comparison snp_caller/src/int_util.h @ 0:0fd352f62446 draft default tip

planemo upload for repository https://github.com/ChrisD11/Duplicon commit 3ee0594c692faac542ffa58f4339d79b9b8aefbd-dirty
author chrisd
date Sun, 21 Feb 2016 06:05:24 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0fd352f62446
1 #ifndef INT_UTIL_H
2 #define INT_UTIL_H
3
4 #include <string>
5 #include <sstream>
6
7 inline
8 int s_to_i(const std::string &pos) {
9 std::istringstream ss(pos);
10 int i;
11 ss >> i;
12 return i;
13 }
14
15 inline
16 int strand_to_i(const std::string &pos) {
17 std::string s = pos.substr(1, pos.length());
18 std::istringstream ss(s);
19 int i;
20 ss >> i;
21 return i;
22 }
23
24
25 #endif // INT_UTIL_H