Add project files
This commit is contained in:
commit
f2fe6b8855
114 files changed
+20525
No files matched your search
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
/// Small string helpers; nothing here knows about breeze.
|
||||
namespace breeze::text
|
||||
{
|
||||
|
||||
std::string trim(std::string_view s);
|
||||
std::vector<std::string> split(std::string_view s, char delimiter);
|
||||
std::vector<std::string> splitLines(std::string_view s);
|
||||
std::string join(const std::vector<std::string>& parts, std::string_view separator);
|
||||
std::string lower(std::string_view s);
|
||||
bool startsWith(std::string_view s, std::string_view prefix);
|
||||
bool endsWith(std::string_view s, std::string_view suffix);
|
||||
std::string replaceAll(std::string s, std::string_view from, std::string_view to);
|
||||
|
||||
/// "CoreFarewell" -> "core_farewell", "HTTPServer" -> "http_server", "my-app" -> "my_app".
|
||||
std::string snakeCase(std::string_view s);
|
||||
|
||||
/// Lower-case letters and digits only: "Clang-CL" -> "clangcl". For comparing names loosely.
|
||||
std::string normalized(std::string_view s);
|
||||
|
||||
/// A module or project name: a letter, then letters, digits, '_' (and '-' when allowDash).
|
||||
bool isName(std::string_view s, bool allowDash = false);
|
||||
|
||||
/// A CMake target id as this project writes them: letters, digits, '_', '.', '+', '-' and "::".
|
||||
bool isTargetId(std::string_view s);
|
||||
|
||||
/// "x" for a version-less message, with a '<none>' stand-in for an empty value.
|
||||
std::string orNone(std::string_view s);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user