JobIdentifier::base_name(const char *filename)
{
std::string name(filename);
- std::string::size_type pos = name.find(".");
+ std::string::size_type pos = name.find('.');
name.erase(pos, name.size());
- pos = name.rfind("/");
+ pos = name.rfind('/');
if (pos < name.size())
name.erase(0,pos);
return name;
// if there is a comment, delete it
if (line.find('#') != std::string::npos)
- line.erase (line.find("#"), std::string::npos);
+ line.erase (line.find('#'), std::string::npos);
// replace \t by space:
while (line.find('\t') != std::string::npos)
// erase "set" statement
line.erase (0, 4);
- std::string::size_type pos = line.find("=");
+ std::string::size_type pos = line.find('=');
AssertThrow (pos != std::string::npos,
ExcCannotParseLine (current_line_n,
input_filename,
MultipleSelection::MultipleSelection (const std::string &seq)
{
- Assert (seq.find (",") == std::string::npos, ExcCommasNotAllowed(seq.find(",")));
+ Assert (seq.find (',') == std::string::npos, ExcCommasNotAllowed(seq.find(',')));
sequence = seq;
while (sequence.find(" |") != std::string::npos)
std::string name;
name = tmp;
- if (name.find(",") != std::string::npos)
+ if (name.find(',') != std::string::npos)
{
- name.erase (name.find(","), std::string::npos);
- tmp.erase (0, tmp.find(",")+1);
+ name.erase (name.find(','), std::string::npos);
+ tmp.erase (0, tmp.find(',')+1);
}
else
tmp = "";
// resize the array so that it is always
// of the same size
- unsigned int pos_non_space = name_out.find_first_not_of (" ");
+ unsigned int pos_non_space = name_out.find_first_not_of (' ');
name_out.erase(0, pos_non_space);
name_out.resize (32, ' ');
out_stream << std::endl;
// resize the array so that it is always
// of the same size
- unsigned int pos_non_space = name_out.find_first_not_of (" ");
+ unsigned int pos_non_space = name_out.find_first_not_of (' ');
name_out.erase(0, pos_non_space);
name_out.resize (32, ' ');
out_stream << std::endl;
while ((text.length() != 0) && (text[0] == delimiter))
text.erase(0, 1);
- std::size_t pos_newline = text.find_first_of("\n", 0);
+ std::size_t pos_newline = text.find_first_of('\n', 0);
if (pos_newline != std::string::npos && pos_newline <= width)
{
std::string line (text, 0, pos_newline);
// now remove whitespace in front of and
// after '='
- std::string::size_type pos=header.find("=");
+ std::string::size_type pos=header.find('=');
while (pos!=static_cast<std::string::size_type>(std::string::npos))
if (header[pos+1]==' ')
--pos;
}
else
- pos=header.find("=",++pos);
+ pos=header.find('=',++pos);
// split the string into individual entries
std::vector<std::string> entries=Utilities::break_text_into_lines(header,1,' ');