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,
19
bool
is_fixed =
true
);
20
21
/// Transform letters to lower case
22
std::string
ToLower
(std::string_view str,
23
const
std::string& locale = kEnLocale);
24
25
/// Transform letters to upper case
26
std::string
ToUpper
(std::string_view str,
27
const
std::string& locale = kEnLocale);
28
29
/// Capitalizes the first letter of the str
30
std::string
Capitalize
(std::string_view str,
const
std::string& locale);
31
32
/// Returns a locale with the specified name
33
const
std::locale&
GetLocale
(
const
std::string& name);
34
35
}
// namespace utils::text
36
37
USERVER_NAMESPACE_END
userver
utils
text.hpp
Generated on Wed May 15 2024 22:24:22 for userver by
Doxygen
1.10.0