struct WinRT:: HString (C++/WinRT)winrt::hstring struct (C++/WinRT)
Raccolta sequenziale di caratteri Unicode UTF-16 che rappresenta una stringa di testo.A sequential collection of UTF-16 Unicode characters representing a text string. Per altri esempi e informazioni su WinRT:: HString, vedere gestione delle stringhe in C++/WinRT.For more examples and info about winrt::hstring, see String handling in C++/WinRT. Il tipo WinRT:: HString incapsula HString dietro un'interfaccia simile a quella di std:: wstring.The winrt::hstring type encapsulates HSTRING behind an interface similar to that of std::wstring. Un HString è un handle per una stringa Windows Runtime.A HSTRING is a handle to a Windows Runtime string.
SintassiSyntax
struct hstring
RequisitiRequirements
SDK minimo supportato: Windows SDK versione 10.0.17134.0 (Windows 10, versione 1803)Minimum supported SDK: Windows SDK version 10.0.17134.0 (Windows 10, version 1803)
Spazio dei nomi: WinRTNamespace: winrt
L' intestazione % WindowsSdkDir% include <WindowsTargetPlatformVersion> \cppwinrt\winrt\base.h (incluso per impostazione predefinita)Header %WindowsSdkDir%Include<WindowsTargetPlatformVersion>\cppwinrt\winrt\base.h (included by default)
Alias del tipo di membroMember type aliases
Nome aliasAlias name | TipoType |
---|---|
HString:: value_typehstring::value_type | Sinonimo di wchar_t.A synonym for wchar_t. |
HString:: size_typehstring::size_type | Sinonimo di uint32_t.A synonym for uint32_t. |
HString:: const_referencehstring::const_reference | Sinonimo di HString:: value_type const&.A synonym for hstring::value_type const&. |
HString:: const_pointerhstring::const_pointer | Sinonimo di **HString:: value_type const * **.A synonym for hstring::value_type const*. |
HString:: const_iteratorhstring::const_iterator | Sinonimo di HString:: const_pointer.A synonym for hstring::const_pointer. |
HString:: const_reverse_iteratorhstring::const_reverse_iterator | Sinonimo di **std:: reverse_iterator <hstring::const_iterator> **.A synonym for std::reverse_iterator<hstring::const_iterator>. |
CostruttoriConstructors
CostruttoreConstructor | DescrizioneDescription |
---|---|
Costruttore HString:: HStringhstring::hstring constructor | Inizializza una nuova istanza dello struct HString con una copia dei dati della stringa di input.Initializes a new instance of the hstring struct with a copy of the input string data. |
Funzioni membroMember functions
FunzioneFunction | DescrizioneDescription |
---|---|
funzione HString:: backhstring::back function | Restituisce un riferimento all'ultimo carattere nell'oggetto HString .Returns a reference to the last character in the hstring object. |
funzione HString:: Beginhstring::begin function | Restituisce un iteratore const al primo carattere nell'oggetto HString .Returns a const iterator to the first character in the hstring object. |
funzione HString:: c_strhstring::c_str function | Restituisce un puntatore alla stringa di tipo C con terminazione null sottostante dei caratteri nell'oggetto HString . non viene eseguita alcuna copia.Returns a pointer to the underlying null-terminated C-style string of the characters in the hstring object; no copy is made. |
funzione HString:: cbeginhstring::cbegin function | Restituisce un iteratore const al primo carattere nell'oggetto HString .Returns a const iterator to the first character in the hstring object. |
funzione HString:: cendhstring::cend function | Restituisce un iteratore const a uno oltre la fine di (uno oltre l'ultimo carattere in) l'oggetto HString .Returns a const iterator to one beyond the end of (one beyond the last character in) the hstring object. |
funzione HString:: Clearhstring::clear function | Rende vuoto l'oggetto HString .Makes the hstring object empty. |
funzione HString:: crbeginhstring::crbegin function | Restituisce un iteratore inverso const a uno oltre la fine di (uno oltre l'ultimo carattere in) l'oggetto HString .Returns a const reverse iterator to one beyond the end of (one beyond the last character in) the hstring object. |
funzione HString:: crendhstring::crend function | Restituisce un iteratore inverso const al primo carattere nell'oggetto HString .Returns a const reverse iterator to the first character in the hstring object. |
HString: funzione ATA:dhstring::data function | Restituisce una versione di stringa in formato C con terminazione null dei caratteri nell'oggetto HString .Returns a null-terminated C-style string version of the characters in the hstring object. |
funzione HString:: Emptyhstring::empty function | Restituisce un valore che indica se l'oggetto HString è vuoto.Returns a value indicating whether the hstring object is empty. |
funzione HString:: endhstring::end function | Restituisce un iteratore const a uno oltre la fine di (uno oltre l'ultimo carattere in) l'oggetto HString .Returns a const iterator to one beyond the end of (one beyond the last character in) the hstring object. |
funzione HString:: fronthstring::front function | Restituisce un riferimento al primo carattere nell'oggetto HString .Returns a reference to the first character in the hstring object. |
funzione HString:: rbeginhstring::rbegin function | Restituisce un iteratore inverso const a uno oltre la fine di (uno oltre l'ultimo carattere in) l'oggetto HString .Returns a const reverse iterator to one beyond the end of (one beyond the last character in) the hstring object. |
funzione HString:: rendhstring::rend function | Restituisce un iteratore inverso const al primo carattere nell'oggetto HString .Returns a const reverse iterator to the first character in the hstring object. |
funzione HString:: sizehstring::size function | Restituisce il numero di caratteri nell'oggetto HString .Returns the number of characters in the hstring object. |
Operatori membroMember operators
OperatoreOperator | DescrizioneDescription |
---|---|
HString:: operator std:: wstring_viewhstring::operator std::wstring_view | Converte l'oggetto HString in std:: wstring_view.Converts the hstring object to a std::wstring_view. |
Operatore HString:: operator [] ( pedice))hstring::operator[] (subscript operator)) | Restituisce un riferimento al carattere in corrispondenza della posizione specificata all'interno dell'oggetto HString .Returns a reference to the character at the specified position within the hstring object. |
HString:: operator = (operatore di assegnazione)hstring::operator= (assignment operator) | Assegna un valore all'oggetto HString .Assigns a value to the hstring object. |
Funzioni gratuiteFree functions
FunzioneFunction | DescrizioneDescription |
---|---|
Funzione attach_abiattach_abi function | Connette un oggetto HString a un handle a una stringa Windows Runtime.Attaches a hstring object to a handle to a Windows Runtime string. |
Funzione copy_from_abicopy_from_abi function | Copia in un oggetto HString da un handle a una stringa Windows Runtime.Copies to a hstring object from a handle to a Windows Runtime string. Cancella HString, copia il parametro e inizia a gestire l'handle.Clears the hstring, copies the parameter, and begins managing the handle. |
Funzione copy_to_abicopy_to_abi function | Copia in un handle in una stringa Windows Runtime da un oggetto HString .Copies to a handle to a Windows Runtime string from a hstring object. |
Funzione detach_abidetach_abi function | Scollega un oggetto HString dal relativo handle, ad esempio per restituirlo a un chiamante.Detaches a hstring object from its handle, perhaps to return it to a caller. |
Funzione to_hstringto_hstring function | Converte un valore di input in un oggetto WinRT:: HString che contiene la rappresentazione di stringa del valore.Converts an input value to a winrt::hstring containing the value's string representation. |
Operatori gratuitiFree operators
OperatoreOperator | DescrizioneDescription |
---|---|
operator! = (operatore di disuguaglianza)operator!= (inequality operator) | Restituisce un valore che indica se i due parametri sono diversi tra loro.Returns a value indicating whether the two parameters are unequal to one another. |
operator + (operatore di concatenazione)operator+ (concatenation operator) | Restituisce un nuovo oggetto HString risultante dalla concatenazione dei due parametri.Returns a new hstring object resulting from concatenating the two parameters together. |
operatore< (operatore minore di)operator< (less-than operator) | Restituisce un valore che indica se il primo parametro è minore del secondo parametro.Returns a value indicating whether the first parameter is less than the second parameter. |
operator<= (operatore minore o uguale a)operator<= (less-than-or-equal-to operator) | Restituisce un valore che indica se il primo parametro è minore o uguale al secondo parametro.Returns a value indicating whether the first parameter is less than or equal to the second parameter. |
operator = = (operatore di uguaglianza)operator== (equality operator) | Restituisce un valore che indica se i due parametri sono uguali tra loro.Returns a value indicating whether the two parameters are equal to one another. |
operatore> (operatore maggiore di)operator> (greater-than operator) | Restituisce un valore che indica se il primo parametro è maggiore del secondo parametro.Returns a value indicating whether the first parameter is greater than the second parameter. |
operatore>= (operatore maggiore o uguale a)operator>= (greater-than-or-equal-to operator) | Restituisce un valore che indica se il primo parametro è maggiore o uguale al secondo parametro.Returns a value indicating whether the first parameter is greater than or equal to the second parameter. |
IteratorsIterators
Un HString è un intervallo e tale intervallo è definito dalle funzioni membro HString:: Begin e HString:: end , ognuna delle quali restituisce un iteratore const (come HString:: cbegin e HString:: cend).An hstring is a range, and that range is defined by the hstring::begin and hstring::end member functions, each of which returns a const iterator (as do hstring::cbegin and hstring::cend). Per questo motivo, è possibile enumerare i caratteri in un oggetto HString con un'istruzione basata sull'intervallo for
o con la funzione di modello std:: for_each .Because of this, you can enumerate the characters in an hstring object with either a range-based for
statement, or with the std::for_each template function.
#include <iostream>
using namespace winrt;
...
void Iterators(hstring const& theHstring)
{
for (auto const& element : theHstring)
{
std::wcout << element;
}
std::for_each(theHstring.cbegin(), theHstring.cend(), [](T const& element) { std::wcout << element; });
}
Costruttore HString:: HStringhstring::hstring constructor
Inizializza una nuova istanza dello struct HString con una copia dei dati della stringa di input.Initializes a new instance of the hstring struct with a copy of the input string data.
SintassiSyntax
hstring() noexcept;
hstring(winrt::hstring const& h);
explicit hstring(std::wstring_view const& v);
hstring(std::wchar_t const* c);
hstring(std::wchar_t const* c, uint32_t s);
ParametriParameters
h
Valore HString che Inizializza l'oggetto HString .h
An hstring value that initializes the hstring object.
v
Valore std:: wstring_view che Inizializza l'oggetto HString .v
A std::wstring_view value that initializes the hstring object.
c
Puntatore a una matrice di wchar_t costanti che Inizializza l'oggetto HString .c
A pointer to an array of constant wchar_t that initializes the hstring object.
s
Numero che specifica una dimensione fissa per l'oggetto HString .s
A number that specifies a fixed size for the hstring object.
EsempioExample
using namespace winrt;
...
void Constructors(
hstring const& theHstring,
std::wstring_view const& theWstringView,
wchar_t const* wideLiteral,
std::wstring const& wideString)
{
// hstring() noexcept
hstring fromDefault{};
// hstring(hstring const& h)
hstring fromHstring{ theHstring };
// explicit hstring(std::wstring_view const& value)
hstring fromWstringView{ theWstringView };
// hstring(wchar_t const* value)
hstring fromWideLiteral{ wideLiteral };
hstring fromWideString{ wideString.c_str() };
// hstring(wchar_t const* value, uint32_t size)
hstring fromWideLiteralWithSize{ wideLiteral, 256 };
hstring fromWideStringWithSize{ wideString.c_str(), 256 };
}
funzione HString:: backhstring::back function
Restituisce un riferimento all'ultimo carattere nell'oggetto HString .Returns a reference to the last character in the hstring object.
SintassiSyntax
std::wchar_t const& back() const noexcept;
Valore restituitoReturn value
Riferimento all'ultimo carattere nell'oggetto HString .A reference to the last character in the hstring object.
funzione HString:: Beginhstring::begin function
Restituisce un iteratore const al primo carattere nell'oggetto HString .Returns a const iterator to the first character in the hstring object. Vedere iteratori.See Iterators.
SintassiSyntax
std::wchar_t const* begin() const noexcept;
Valore restituitoReturn value
Iteratore const al primo carattere nell'oggetto HString .A const iterator to the first character in the hstring object.
funzione HString:: c_strhstring::c_str function
Restituisce un puntatore alla stringa di tipo C con terminazione null sottostante dei caratteri nell'oggetto HString . non viene eseguita alcuna copia.Returns a pointer to the underlying null-terminated C-style string of the characters in the hstring object; no copy is made.
SintassiSyntax
std::wchar_t const* c_str() const noexcept;
Valore restituitoReturn value
Puntatore alla stringa di tipo C con terminazione null sottostante dei caratteri nell'oggetto HString . non viene eseguita alcuna copia.A pointer to the underlying null-terminated C-style string of the characters in the hstring object; no copy is made.
EsempioExample
#include <iostream>
using namespace winrt;
...
void PrintHstring(hstring const& theHstring)
{
// You can get a standard wide string from an hstring.
std::wcout << theHstring.c_str() << std::endl;
}
funzione HString:: cbeginhstring::cbegin function
Restituisce un iteratore const al primo carattere nell'oggetto HString .Returns a const iterator to the first character in the hstring object. Vedere iteratori.See Iterators.
SintassiSyntax
std::wchar_t const* cbegin() const noexcept;
Valore restituitoReturn value
Iteratore const al primo carattere nell'oggetto HString .A const iterator to the first character in the hstring object.
funzione HString:: cendhstring::cend function
Restituisce un iteratore const a uno oltre la fine di (uno oltre l'ultimo carattere in) l'oggetto HString .Returns a const iterator to one beyond the end of (one beyond the last character in) the hstring object. Vedere iteratori.See Iterators.
SintassiSyntax
std::wchar_t const* cend() const noexcept;
Valore restituitoReturn value
Iteratore const a uno oltre la fine di (uno oltre l'ultimo carattere in) l'oggetto HString .A const iterator to one beyond the end of (one beyond the last character in) the hstring object.
funzione HString:: Clearhstring::clear function
Rende vuoto l'oggetto HString .Makes the hstring object empty.
SintassiSyntax
void clear() noexcept;
funzione HString:: crbeginhstring::crbegin function
Restituisce un iteratore inverso const a uno oltre la fine di (uno oltre l'ultimo carattere in) l'oggetto HString .Returns a const reverse iterator to one beyond the end of (one beyond the last character in) the hstring object.
SintassiSyntax
std::reverse_iterator<std::wchar_t const*> crbegin() const noexcept;
Valore restituitoReturn value
Iteratore inverso const verso uno oltre la fine di (uno oltre l'ultimo carattere in) l'oggetto HString .A const reverse iterator to one beyond the end of (one beyond the last character in) the hstring object.
funzione HString:: crendhstring::crend function
Restituisce un iteratore inverso const al primo carattere nell'oggetto HString .Returns a const reverse iterator to the first character in the hstring object.
SintassiSyntax
std::reverse_iterator<std::wchar_t const*> crend() const noexcept;
Valore restituitoReturn value
Iteratore inverso const al primo carattere nell'oggetto HString .A const reverse iterator to the first character in the hstring object.
HString: funzione ATA:dhstring::data function
Restituisce una versione di stringa in formato C con terminazione null dei caratteri nell'oggetto HString .Returns a null-terminated C-style string version of the characters in the hstring object.
SintassiSyntax
std::wchar_t const* data() const noexcept;
Valore restituitoReturn value
Versione di stringa in formato C con terminazione null dei caratteri nell'oggetto HString .A null-terminated C-style string version of the characters in the hstring object.
EsempioExample
#include <iostream>
using namespace winrt;
...
void PrintHstring(hstring const& theHstring)
{
// You can get a standard wide string from an hstring.
std::wcout << theHstring.data() << std::endl;
}
funzione HString:: Emptyhstring::empty function
Restituisce un valore che indica se l'oggetto HString è vuoto.Returns a value indicating whether the hstring object is empty.
SintassiSyntax
bool empty() const noexcept;
Valore restituitoReturn value
true
Se l'oggetto HString è vuoto; in caso contrario, false
.true
if the hstring object is empty, otherwise false
.
funzione HString:: endhstring::end function
Restituisce un iteratore const a uno oltre la fine di (uno oltre l'ultimo carattere in) l'oggetto HString .Returns a const iterator to one beyond the end of (one beyond the last character in) the hstring object. Vedere iteratori.See Iterators.
SintassiSyntax
std::wchar_t const* end() const noexcept;
Valore restituitoReturn value
Iteratore const a uno oltre la fine di (uno oltre l'ultimo carattere in) l'oggetto HString .A const iterator to one beyond the end of (one beyond the last character in) the hstring object.
funzione HString:: fronthstring::front function
Restituisce un riferimento al primo carattere nell'oggetto HString .Returns a reference to the first character in the hstring object.
SintassiSyntax
std::wchar_t const& front() const noexcept;
Valore restituitoReturn value
Riferimento al primo carattere nell'oggetto HString .A reference to the first character in the hstring object.
HString:: operator std:: wstring_viewhstring::operator std::wstring_view
Converte l'oggetto HString in std:: wstring_view.Converts the hstring object to a std::wstring_view.
SintassiSyntax
operator std::wstring_view() const noexcept;
Valore restituitoReturn value
Oggetto HString convertito in std:: wstring_view.The hstring object converted to a std::wstring_view.
EsempioExample
using namespace winrt;
...
Uri contosoUri{ L"https://www.contoso.com" };
Uri awUri{ L"https://www.adventure-works.com" };
// Uri::Domain() is of type hstring. But we can use hstring's conversion operator to std::wstring_view.
std::wstring domainWstring{ contosoUri.Domain() }; // L"contoso.com"
domainWstring = awUri.Domain(); // L"https://www.adventure-works.com"
Operatore HString:: operator [] ( pedice)hstring::operator[] (subscript operator)
Restituisce un riferimento al carattere in corrispondenza della posizione specificata all'interno dell'oggetto HString .Returns a reference to the character at the specified position within the hstring object.
SintassiSyntax
std::wchar_t const& operator[](uint32_t pos) const noexcept;
ParametriParameters
pos
Posizione del carattere in base zero, o indice.pos
A zero-based character position, or index.
Valore restituitoReturn value
Riferimento al carattere in corrispondenza della posizione specificata all'interno dell'oggetto HString .A reference to the character at the specified position within the hstring object.
HString:: operator = (operatore di assegnazione)hstring::operator= (assignment operator)
Assegna un valore all'oggetto HString .Assigns a value to the hstring object.
SintassiSyntax
winrt::hstring& operator=(winrt::hstring const& h);
winrt::hstring& operator=(std::wstring_view const& v);
ParametriParameters
h
Valore HString da assegnare all'oggetto HString .h
An hstring value to assign to the hstring object.
v
Valore std:: wstring_view da assegnare all'oggetto HString .v
A std::wstring_view value to assign to the hstring object.
Valore restituitoReturn value
Riferimento all'oggetto HString .A reference to the hstring object.
funzione HString:: rbeginhstring::rbegin function
Restituisce un iteratore inverso const a uno oltre la fine di (uno oltre l'ultimo carattere in) l'oggetto HString .Returns a const reverse iterator to one beyond the end of (one beyond the last character in) the hstring object.
SintassiSyntax
std::reverse_iterator<std::wchar_t const*> rbegin() const noexcept;
Valore restituitoReturn value
Iteratore inverso const verso uno oltre la fine di (uno oltre l'ultimo carattere in) l'oggetto HString .A const reverse iterator to one beyond the end of (one beyond the last character in) the hstring object.
funzione HString:: rendhstring::rend function
Restituisce un iteratore inverso const al primo carattere nell'oggetto HString .Returns a const reverse iterator to the first character in the hstring object.
SintassiSyntax
std::reverse_iterator<std::wchar_t const*> rend() const noexcept;
Valore restituitoReturn value
Iteratore inverso const al primo carattere nell'oggetto HString .A const reverse iterator to the first character in the hstring object.
funzione HString:: sizehstring::size function
Restituisce il numero di caratteri nell'oggetto HString .Returns the number of characters in the hstring object.
SintassiSyntax
uint32_t size() const noexcept;
Valore restituitoReturn value
Uint32_t contenente il numero di caratteri nell'oggetto HString .A uint32_t containing the number of characters in the hstring object.
Funzione attach_abiattach_abi function
Connette un oggetto HString a un handle a una stringa Windows Runtime.Attaches a hstring object to a handle to a Windows Runtime string.
SintassiSyntax
void attach_abi(winrt::hstring& object, HSTRING value) noexcept;
ParametriParameters
object
Oggetto HString su cui operare.object
A hstring object to operate on.
value
Handle per una stringa Windows Runtime.value
A handle to a Windows Runtime string.
Funzione copy_from_abicopy_from_abi function
Copia in un oggetto HString da un handle a una stringa Windows Runtime.Copies to a hstring object from a handle to a Windows Runtime string. Cancella HString, copia il parametro e inizia a gestire l'handle.Clears the hstring, copies the parameter, and begins managing the handle.
SintassiSyntax
void copy_from_abi(winrt::hstring& object, HSTRING value);
ParametriParameters
object
Oggetto HString su cui operare.object
A hstring object to operate on.
value
Handle per una stringa Windows Runtime.value
A handle to a Windows Runtime string.
Funzione copy_to_abicopy_to_abi function
Copia in un handle in una stringa Windows Runtime da un oggetto HString .Copies to a handle to a Windows Runtime string from a hstring object.
SintassiSyntax
void copy_to_abi(winrt::hstring const& object, HSTRING& value);
ParametriParameters
object
Oggetto HString su cui operare.object
A hstring object to operate on.
value
Riferimento all'handle, tramite il quale copiare l'handle del HString.value
A handle reference, via which to copy the hstring's handle.
Funzione detach_abidetach_abi function
Scollega un oggetto HString dal relativo handle, ad esempio per restituirlo a un chiamante.Detaches a hstring object from its handle, perhaps to return it to a caller.
SintassiSyntax
HSTRING detach_abi(winrt::hstring& object) noexcept;
HSTRING detach_abi(winrt::hstring&& object) noexcept;
ParametriParameters
object
Oggetto HString su cui operare.object
A hstring object to operate on.
Valore restituitoReturn value
Handle per la stringa Windows Runtime.The handle to the Windows Runtime string.
operator! = (operatore di disuguaglianza)operator!= (inequality operator)
Restituisce un valore che indica se i due parametri sono diversi tra loro.Returns a value indicating whether the two parameters are unequal to one another.
SintassiSyntax
inline bool operator!=(winrt::hstring const& hLeft, winrt::hstring const& hRight) noexcept;
inline bool operator!=(winrt::hstring const& hLeft, std::wstring const& wRight) noexcept;
inline bool operator!=(winrt::hstring const& hLeft, std::wchar_t const* cRight) noexcept;
inline bool operator!=(std::wstring const& wLeft, winrt::hstring const& hRight) noexcept;
inline bool operator!=(std::wchar_t const* cLeft, winrt::hstring const& hRight) noexcept;
ParametriParameters
hLeft``hRight
Valore HString da confrontare con l'altro parametro.hLeft
hRight
An hstring value to compare with the other parameter.
wLeft``wRight
std::wstring
Valore da confrontare con l'altro parametro.wLeft
wRight
A std::wstring
value to compare with the other parameter.
cLeft``cRight
Puntatore a una matrice di wchar_t costanti da confrontare con l'altro parametro.cLeft
cRight
A pointer to an array of constant wchar_t to compare with the other parameter.
Valore restituitoReturn value
true
Se i due parametri sono diversi tra loro, in caso contrario false
.true
if the two parameters are unequal to one another, otherwise false
.
operator + (operatore di concatenazione)operator+ (concatenation operator)
Restituisce un nuovo oggetto HString risultante dalla concatenazione dei due parametri.Returns a new hstring object resulting from concatenating the two parameters together.
SintassiSyntax
inline hstring operator+(winrt::hstring const& hLeft, winrt::hstring const& hRight);
inline hstring operator+(winrt::hstring const& hLeft, std::wstring const& wRight);
inline hstring operator+(winrt::hstring const& hLeft, std::wstring_view const& vRight);
inline hstring operator+(winrt::hstring const& hLeft, std::wchar_t const* cRight);
inline hstring operator+(winrt::hstring const& hLeft, std::wchar_t scRight);
inline hstring operator+(std::wstring const& wLeft, winrt::hstring const& hRight);
inline hstring operator+(std::wstring_view const& vLeft, winrt::hstring const& hRight);
inline hstring operator+(std::wchar_t const* cLeft, winrt::hstring const& hRight);
inline hstring operator+(std::wchar_t scLeft, winrt::hstring const& hRight);
ParametriParameters
hLeft``hRight
Valore HString da concatenare con l'altro parametro.hLeft
hRight
An hstring value to concatenate with the other parameter.
wLeft``wRight
std::wstring
Valore da concatenare con l'altro parametro.wLeft
wRight
A std::wstring
value to concatenate with the other parameter.
vLeft``vRight
Valore std:: wstring_view da concatenare con l'altro parametro.vLeft
vRight
A std::wstring_view value to concatenate with the other parameter.
cLeft``cRight
Puntatore a una matrice di wchar_t costante da concatenare con l'altro parametro.cLeft
cRight
A pointer to an array of constant wchar_t to concatenate with the other parameter.
scLeft``scRight
Wchar_t per la concatenazione con l'altro parametro.scLeft
scRight
A wchar_t to concatenate with the other parameter.
Valore restituitoReturn value
Un nuovo oggetto HString risultante dalla concatenazione dei due parametri.A new hstring object resulting from concatenating the two parameters together.
operatore< (operatore minore di)operator< (less-than operator)
Restituisce un valore che indica se il primo parametro è minore del secondo parametro.Returns a value indicating whether the first parameter is less than the second parameter.
SintassiSyntax
inline bool operator<(winrt::hstring const& hLeft, winrt::hstring const& hRight) noexcept;
inline bool operator<(winrt::hstring const& hLeft, std::wstring const& wRight) noexcept;
inline bool operator<(winrt::hstring const& hLeft, std::wchar_t const* cRight) noexcept;
inline bool operator<(std::wstring const& wLeft, winrt::hstring const& hRight) noexcept;
inline bool operator<(std::wchar_t const* cLeft, winrt::hstring const& hRight) noexcept;
ParametriParameters
hLeft``hRight
Valore HString da confrontare con l'altro parametro.hLeft
hRight
An hstring value to compare with the other parameter.
wLeft``wRight
std::wstring
Valore da confrontare con l'altro parametro.wLeft
wRight
A std::wstring
value to compare with the other parameter.
cLeft``cRight
Puntatore a una matrice di wchar_t costanti da confrontare con l'altro parametro.cLeft
cRight
A pointer to an array of constant wchar_t to compare with the other parameter.
Valore restituitoReturn value
true
Se il primo parametro è minore del secondo parametro; in caso contrario, false
.true
if the first parameter is less than the second parameter, otherwise false
.
operator<= (operatore minore o uguale a)operator<= (less-than-or-equal-to operator)
Restituisce un valore che indica se il primo parametro è minore o uguale al secondo parametro.Returns a value indicating whether the first parameter is less than or equal to the second parameter.
SintassiSyntax
inline bool operator<=(winrt::hstring const& hLeft, winrt::hstring const& hRight) noexcept;
inline bool operator<=(winrt::hstring const& hLeft, std::wstring const& wRight) noexcept;
inline bool operator<=(winrt::hstring const& hLeft, std::wchar_t const* cRight) noexcept;
inline bool operator<=(std::wstring const& wLeft, winrt::hstring const& hRight) noexcept;
inline bool operator<=(std::wchar_t const* cLeft, winrt::hstring const& hRight) noexcept;
ParametriParameters
hLeft``hRight
Valore HString da confrontare con l'altro parametro.hLeft
hRight
An hstring value to compare with the other parameter.
wLeft``wRight
std::wstring
Valore da confrontare con l'altro parametro.wLeft
wRight
A std::wstring
value to compare with the other parameter.
cLeft``cRight
Puntatore a una matrice di wchar_t costanti da confrontare con l'altro parametro.cLeft
cRight
A pointer to an array of constant wchar_t to compare with the other parameter.
Valore restituitoReturn value
true
Se il primo parametro è minore o uguale al secondo parametro; in caso contrario, false
.true
if the first parameter is less than or equal to the second parameter, otherwise false
.
operator = = (operatore di uguaglianza)operator== (equality operator)
Restituisce un valore che indica se i due parametri sono uguali tra loro.Returns a value indicating whether the two parameters are equal to one another.
SintassiSyntax
inline bool operator==(winrt::hstring const& hLeft, winrt::hstring const& hRight) noexcept;
inline bool operator==(winrt::hstring const& hLeft, std::wstring const& wRight) noexcept;
inline bool operator==(winrt::hstring const& hLeft, std::wchar_t const* cRight) noexcept;
inline bool operator==(std::wstring const& wLeft, winrt::hstring const& hRight) noexcept;
inline bool operator==(std::wchar_t const* cLeft, winrt::hstring const& hRight) noexcept;
ParametriParameters
hLeft``hRight
Valore HString da confrontare con l'altro parametro.hLeft
hRight
An hstring value to compare with the other parameter.
wLeft``wRight
std::wstring
Valore da confrontare con l'altro parametro.wLeft
wRight
A std::wstring
value to compare with the other parameter.
cLeft``cRight
Puntatore a una matrice di wchar_t costanti da confrontare con l'altro parametro.cLeft
cRight
A pointer to an array of constant wchar_t to compare with the other parameter.
Valore restituitoReturn value
true
Se i due parametri sono uguali tra loro; in caso contrario, false
.true
if the two parameters are equal to one another, otherwise false
.
operatore> (operatore maggiore di)operator> (greater-than operator)
Restituisce un valore che indica se il primo parametro è maggiore del secondo parametro.Returns a value indicating whether the first parameter is greater than the second parameter.
SintassiSyntax
inline bool operator>(winrt::hstring const& hLeft, winrt::hstring const& hRight) noexcept;
inline bool operator>(winrt::hstring const& hLeft, std::wstring const& wRight) noexcept;
inline bool operator>(winrt::hstring const& hLeft, std::wchar_t const* cRight) noexcept;
inline bool operator>(std::wstring const& wLeft, winrt::hstring const& hRight) noexcept;
inline bool operator>(std::wchar_t const* cLeft, winrt::hstring const& hRight) noexcept;
ParametriParameters
hLeft``hRight
Valore HString da confrontare con l'altro parametro.hLeft
hRight
An hstring value to compare with the other parameter.
wLeft``wRight
std::wstring
Valore da confrontare con l'altro parametro.wLeft
wRight
A std::wstring
value to compare with the other parameter.
cLeft``cRight
Puntatore a una matrice di wchar_t costanti da confrontare con l'altro parametro.cLeft
cRight
A pointer to an array of constant wchar_t to compare with the other parameter.
Valore restituitoReturn value
true
Se il primo parametro è maggiore del secondo parametro; in caso contrario, false
.true
if the first parameter is greater than the second parameter, otherwise false
.
operatore>= (operatore maggiore o uguale a)operator>= (greater-than-or-equal-to operator)
Restituisce un valore che indica se il primo parametro è maggiore o uguale al secondo parametro.Returns a value indicating whether the first parameter is greater than or equal to the second parameter.
SintassiSyntax
inline bool operator>=(winrt::hstring const& hLeft, winrt::hstring const& hRight) noexcept;
inline bool operator>=(winrt::hstring const& hLeft, std::wstring const& wRight) noexcept;
inline bool operator>=(winrt::hstring const& hLeft, std::wchar_t const* cRight) noexcept;
inline bool operator>=(std::wstring const& wLeft, winrt::hstring const& hRight) noexcept;
inline bool operator>=(std::wchar_t const* cLeft, winrt::hstring const& hRight) noexcept;
ParametriParameters
hLeft``hRight
Valore HString da confrontare con l'altro parametro.hLeft
hRight
An hstring value to compare with the other parameter.
wLeft``wRight
std::wstring
Valore da confrontare con l'altro parametro.wLeft
wRight
A std::wstring
value to compare with the other parameter.
cLeft``cRight
Puntatore a una matrice di wchar_t costanti da confrontare con l'altro parametro.cLeft
cRight
A pointer to an array of constant wchar_t to compare with the other parameter.
Valore restituitoReturn value
true
Se il primo parametro è maggiore o uguale al secondo parametro; in caso contrario, false
.true
if the first parameter is greater than or equal to the second parameter, otherwise false
.