36 #include <lifev/core/util/StringUtility.hpp> 42 while ( s.get() !=
'\n' && s . good() )
60 return s.putback ( c ) ;
63 std::istream& nextGoodLine ( std::istream& s, std::string& line )
70 std::string& setStringLength ( std::string& s,
unsigned int len,
char c )
77 std::string stmp ( len, c );
78 if ( s.length() > len )
80 s.erase ( len, s.length() );
82 stmp.replace ( 0, s.length(), s );
87 int atoi (
const std::string& s )
89 return ::atoi ( s.c_str() );
92 std::string operator+ (
const std::string& str,
const int i )
94 int digits = i == 0 ? 2 : std::log10 ( std::abs (i) ) + 2;
95 char* str_i =
new char[ digits ];
96 sprintf ( str_i,
"%i", i );
97 std::string str2 = str + str_i;
102 std::string
operator+ (
const std::string& str,
const long i )
104 int digits = i == 0 ? 2 : std::log10 ( std::abs (i) ) + 2;
105 char* str_i =
new char[ digits ];
106 sprintf ( str_i,
"%ld", i );
107 std::string str2 = str + str_i;
112 std::string operator+ (
const std::string& str,
const unsigned int i )
114 int digits = i == 0 ? 2 : std::log10 (i) + 2;
115 char* str_i =
new char[ digits ];
116 sprintf ( str_i,
"%u", i );
117 std::string str2 = str + str_i;
std::istream & eatLine(std::istream &s)
std::string operator+(const std::string &str, const long i)
void updateInverseJacobian(const UInt &iQuadPt)
std::istream & eatComments(std::istream &s)
skip lines starting with '!%#;$'