userver
C++ Async Framework
Loading...
Searching...
No Matches
text.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/utils/text.hpp
4
/// @brief Text utilities
5
6
#
include
<
locale
>
7
8
#
include
<
userver
/
utils
/
text_light
.
hpp
>
9
10
USERVER_NAMESPACE_BEGIN
11
12
/// @brief Text utilities
13
namespace
utils
::
text
{
14
15
inline
const
std::string kEnLocale{
"en_US.UTF-8"
};
16
17
/// Return number formatted with specified locale
18
std::string
Format
(
double
value,
const
std::string& locale,
int
ndigits = 0,
bool
is_fixed =
true
);
19
20
/// Transform letters to lower case
21
std::string
ToLower
(std::string_view str,
const
std::string& locale = kEnLocale);
22
23
/// Transform letters to upper case
24
std::string
ToUpper
(std::string_view str,
const
std::string& locale = kEnLocale);
25
26
/// Capitalizes the first letter of the str
27
std::string
Capitalize
(std::string_view str,
const
std::string& locale);
28
29
/// Returns a locale with the specified name
30
const
std::locale&
GetLocale
(
const
std::string& name);
31
32
}
// namespace utils::text
33
34
USERVER_NAMESPACE_END
userver
utils
text.hpp
Generated on Mon Sep 29 2025 12:38:22 for userver by
Doxygen
1.13.2