Browse Source

formatting only / doc

OS390/rc1
heck 9 months ago
parent
commit
cbdc72995e
2 changed files with 4 additions and 4 deletions
  1. +3
    -3
      src/std_utils.cc
  2. +1
    -1
      src/std_utils.hh

+ 3
- 3
src/std_utils.cc View File

@ -101,7 +101,7 @@ namespace pEp {
}
}
std::string path_dirname(std::string const& f)
std::string path_dirname(std::string const &f)
{
if (f.empty())
return f;
@ -123,12 +123,12 @@ namespace pEp {
return std::string(f.c_str(), len);
}
std::string path_get_abs(const std::string& path)
std::string path_get_abs(const std::string &path)
{
std::string ret{ path };
if (path[0] != '/') {
char cwd[2048];
char const* res = getcwd(cwd, sizeof(cwd));
char const *res = getcwd(cwd, sizeof(cwd));
if (res == nullptr) {
throw std::runtime_error(
"failed to get current working directory: " + std::string(strerror(errno)));


+ 1
- 1
src/std_utils.hh View File

@ -65,7 +65,7 @@ namespace pEp {
std::vector<std::string> dir_list_files(const std::string &dirname);
#endif
//String formatting
//String tools
std::string padTo(const std::string &str, const size_t num, const char paddingChar);
std::string clip(const std::string &str, const size_t len);
std::string tldr(const std::string &str, const size_t len);


Loading…
Cancel
Save