-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathUtils.h
38 lines (28 loc) · 801 Bytes
/
Utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// -*- c++ -*-
// Copyright 2009 Isis Innovation Limited
/********************************************************************
A set of utility functions
Author: Robert Castle, 2009, [email protected]
********************************************************************/
#ifndef __PTAMM_UTILS__
#define __PTAMM_UTILS__
#include <string>
#include <iostream>
#include <iterator>
#include <vector>
namespace PTAMM {
/**
* Output a vector as a stream that is space separated.
* @param os Output stream
* @param v Vector to output
* @return the stream output
*/
template<class T>
std::ostream& operator<<(std::ostream& os, const std::vector<T>& v)
{
std::copy(v.begin(), v.end(), std::ostream_iterator<T>(os, " "));
return os;
}
void PruneWhiteSpace(std::string & str);
}
#endif