view 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
line wrap: on
line source

#ifndef INT_UTIL_H
#define INT_UTIL_H

#include <string>
#include <sstream>

inline
int s_to_i(const std::string &pos) {
	std::istringstream ss(pos);
	int i;
	ss >> i;
	return i;
}

inline
int strand_to_i(const std::string &pos) {
	std::string s = pos.substr(1, pos.length());
	std::istringstream ss(s);
	int i;
	ss >> i;
	return i;
}


#endif // INT_UTIL_H