mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add generator 'caption' property
This commit is contained in:
parent
7c56d8fd7f
commit
de00414456
11 changed files with 59 additions and 21 deletions
|
|
@ -405,6 +405,13 @@ std::wstring util::capitalized(const std::wstring& str) {
|
|||
str.substr(1);
|
||||
}
|
||||
|
||||
std::string util::capitalized(const std::string& str) {
|
||||
if (str.empty()) return str;
|
||||
static const std::locale loc("");
|
||||
return std::string({static_cast<char>(std::toupper(str[0], loc))}) +
|
||||
str.substr(1);
|
||||
}
|
||||
|
||||
std::wstring util::pascal_case(const std::wstring& str) {
|
||||
if (str.empty()) return str;
|
||||
static const std::locale loc("");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue