• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openmc-dev / openmc / 13591584831

28 Feb 2025 03:46PM UTC coverage: 85.051% (+0.3%) from 84.722%
13591584831

Pull #3067

github

web-flow
Merge 08055e996 into c26fde666
Pull Request #3067: Implement user-configurable random number stride

36 of 44 new or added lines in 8 files covered. (81.82%)

3588 existing lines in 111 files now uncovered.

51062 of 60037 relevant lines covered (85.05%)

32650986.73 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/include/openmc/string_utils.h
1
#ifndef OPENMC_STRING_UTILS_H
2
#define OPENMC_STRING_UTILS_H
3

4
#include <sstream>
5
#include <string>
6

7
#include "openmc/vector.h"
8

9
namespace openmc {
10

11
std::string& strtrim(std::string& s);
12

13
char* strtrim(char* c_str);
14

15
std::string to_element(const std::string& name);
16

17
void to_lower(std::string& str);
18

19
int word_count(const std::string& str);
20

21
vector<std::string> split(const std::string& in);
22

23
bool ends_with(const std::string& value, const std::string& ending);
24

25
bool starts_with(const std::string& value, const std::string& beginning);
26

27
template<typename T>
28
inline std::string concatenate(const T& values, const std::string& del = ", ")
29
{
UNCOV
30
  if (values.size() == 0)
×
UNCOV
31
    return "";
×
32

UNCOV
33
  std::stringstream oss;
×
UNCOV
34
  auto it = values.begin();
×
UNCOV
35
  oss << *it++;
×
UNCOV
36
  while (it != values.end()) {
×
UNCOV
37
    oss << del << *it++;
×
38
  }
UNCOV
39
  return oss.str();
×
40
}
41

42
} // namespace openmc
43
#endif // OPENMC_STRING_UTILS_H
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc