-
-
Notifications
You must be signed in to change notification settings - Fork 455
Expand file tree
/
Copy pathUtils.hpp
More file actions
26 lines (20 loc) · 739 Bytes
/
Utils.hpp
File metadata and controls
26 lines (20 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once
#include <string>
namespace libprojectM {
namespace Utils {
auto ToLower(const std::string& str) -> std::string;
auto ToUpper(const std::string& str) -> std::string;
void ToLowerInPlace(std::string& str);
void ToUpperInPlace(std::string& str);
/**
* @brief Strips C and C++ style comments from source code.
*
* Replaces // line comments and block comments with spaces, preserving
* string length and newline positions so that character offsets remain valid.
*
* @param source The source code string to strip comments from.
* @return A copy of the source with all comment content replaced by spaces.
*/
auto StripComments(const std::string& source) -> std::string;
} // namespace Utils
} // namespace libprojectM