FACT++
1.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
std::string fits::Table::Trim
(
const std::string &
str
,
char
c
=
' '
)
const
inline
Definition at line
122
of file
fits.h
.
123
{
124
// Trim Both leading and trailing spaces
125
const
size_t
pstart =
str
.find_first_not_of(c);
// Find the first character position after excluding leading blank spaces
126
const
size_t
pend =
str
.find_last_not_of(c);
// Find the first character position from reverse af
127
128
// if all spaces or empty return an empty string
129
if
(std::string::npos==pstart || std::string::npos==pend)
130
return
std::string();
131
132
return
str
.substr(pstart, pend-pstart+1);
133
}
str
char str[80]
Definition:
test_client.c:7
fits
Table
Generated on Sun Sep 18 2016 20:50:52 for FACT++ by
1.8.11