File: misc.h

package info (click to toggle)
martchus-cpp-utilities 5.33.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,396 kB
  • sloc: cpp: 12,679; awk: 18; ansic: 12; makefile: 10
file content (18 lines) | stat: -rw-r--r-- 587 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef IOUTILITIES_MISC_H
#define IOUTILITIES_MISC_H

#include "../global.h"

#include <string>
#include <string_view>

namespace CppUtilities {

CPP_UTILITIES_EXPORT std::string readFile(const std::string &path, std::string::size_type maxSize = std::string::npos);
#ifdef CPP_UTILITIES_IOMISC_STRING_VIEW
CPP_UTILITIES_EXPORT std::string readFile(std::string_view path, std::string_view::size_type maxSize = std::string_view::npos);
#endif
CPP_UTILITIES_EXPORT void writeFile(std::string_view path, std::string_view contents);
} // namespace CppUtilities

#endif // IOUTILITIES_MISC_H