xtd 0.2.0
Loading...
Searching...
No Matches
translator.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../string.hpp"
6#include "../types.hpp"
7#define __XTD_STD_INTERNAL__
9#undef __XTD_STD_INTERNAL__
11
13namespace xtd {
15 inline namespace literals {
17
30 inline const char* operator""_t(const char* s, xtd::size n) noexcept {return xtd::globalization::translator::translate(s);}
31
43 inline xtd::string operator""_t(const char8* s, xtd::size n) noexcept {return xtd::globalization::translator::translate(xtd::u8string(s, s + n)); }
44
56 inline xtd::string operator""_t(const char16* s, xtd::size n) noexcept {return xtd::globalization::translator::translate(xtd::u16string(s, s + n));}
57
69 inline xtd::string operator""_t(const char32* s, xtd::size n) noexcept {return xtd::globalization::translator::translate(xtd::u32string(s, s + n));}
70
82 inline xtd::string operator""_t(const wchar* s, xtd::size n) noexcept {return xtd::globalization::translator::translate(xtd::wstring(s, s + n));}
84 }
85}
Contains __xtd_std_version definitions.
static xtd::string translate(const xtd::string &value) noexcept
Translates a string into the lganguage specified by the xtd::translate::language property.
Definition translator.hpp:98
Contains xtd::globalization::translator class.
xtd::basic_string< xtd::char8 > u8string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:76
xtd::basic_string< xtd::char32 > u32string
Represents text as a sequence of UTF-32 code units.
Definition __string_definitions.hpp:65
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
xtd::basic_string< xtd::char16 > u16string
Represents text as a sequence of UTF-16 code units.
Definition __string_definitions.hpp:54
xtd::basic_string< xtd::wchar > wstring
Represents text as a sequence of UTF-16 code unit on Windows or UTF-32 code unit on non-Windows syste...
Definition __string_definitions.hpp:87
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
char8_t char8
Represents a 8-bit unicode character.
Definition char8.hpp:26
wchar_t wchar
Represents a wide character.
Definition wchar.hpp:24
char16_t char16
Represents a 16-bit unicode character.
Definition char16.hpp:26
char32_t char32
Represents a 32-bit unicode character.
Definition char32.hpp:23
@ s
The S key.
Definition console_key.hpp:124
@ n
The N key.
Definition console_key.hpp:114
The xtd::literals namespace contains all xtd's litterals operators.
Definition character_literals.hpp:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::string alias.
Contains xtd fundamental types.