util/utils.h File Reference

Go to the source code of this file.

Functions

template<typename A , typename B >
convertTo (A a)
void chomp (std::string &str)


Function Documentation

void chomp ( std::string &  str  ) 

Remove whitespaces at the end and the beginning of str.

Example:

std::string foo("  bar  ");
chomp(foo);

The result is: foo = "bar" (whitespaces removed)

Parameters:
str in/out: Reference to a string to be modified.

Definition at line 3 of file utils.cpp.


Generated on Sun Nov 30 23:45:40 2008 for Modular Motion Processor by  doxygen 1.5.7.1