Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
string.h
1#ifndef OE_UTIL_STRINGUTILS_H
2#define OE_UTIL_STRINGUTILS_H
3
4#include <cstdint>
5#include <vector>
6#include <string>
7
11namespace oe::util::str
12{
16 std::vector<std::string> split(const std::string &input, const char separator);
17
21 std::vector<std::string> split(const std::string &input, const std::string& separator);
22
26 bool replace(std::string& str, const std::string& from, const std::string& to);
27
28 // Todo put belows in file system ?
29 const std::string getBasename(const std::string& path, int32_t show_parent_level = 0);
30
31 const std::string sanitizeFilename(const std::string& filename, const char replace_invalid_to = '_');
32
33 const std::string getFileExtension(const std::string& filename);
34
35 const std::string removeFileExtension(const std::string& filename);
36 const std::string removeFileExtension(const std::string& filename, std::string& extension);
37}
38#endif
Definition node.h:15
bool replace(std::string &str, const std::string &from, const std::string &to)
std::vector< std::string > split(const std::string &input, const std::string &separator)