userver: userver/utils/text.hpp File Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
text.hpp File Reference

Detailed Description

Text utilities.

Definition in file text.hpp.

Go to the source code of this file.

#include <locale>
#include <userver/utils/text_light.hpp>
+ Include dependency graph for text.hpp:

Namespaces

namespace  utils
 Utilities.
 
namespace  utils::text
 Text utilities.
 

Functions

std::string utils::text::Format (double value, const std::string &locale, int ndigits=0, bool is_fixed=true)
 Return number formatted with specified locale.
 
std::string utils::text::ToLower (std::string_view str, const std::string &locale=kEnLocale)
 Transform letters to lower case.
 
std::string utils::text::ToUpper (std::string_view str, const std::string &locale=kEnLocale)
 Transform letters to upper case.
 
std::string utils::text::Capitalize (std::string_view str, const std::string &locale)
 Capitalizes the first letter of the str.
 
const std::locale & utils::text::GetLocale (const std::string &name)
 Returns a locale with the specified name.
 

Variables

const std::string utils::text::kEnLocale {"en_US.UTF-8"}