Namespace
Varianti

cpp/string: differenze tra le versioni

Da cppreference.com.
< cpp
m (r2.7.3) (Bot: Aggiungo ar, en, es, fr, ja, pt, ru, zh)
m (Allow search engines to index popular pages.)
 
(2 revisioni intermedie di 2 utenti non mostrate)
Riga 1: Riga 1:
{{tr_note}}
+
{{}}
 
{{title|Strings library}}
 
{{title|Strings library}}
 
{{cpp/string/navbar}}
 
{{cpp/string/navbar}}
Riga 5: Riga 5:
 
{{tr|La libreria C + + le stringhe include il supporto per due tipi generali di stringhe:|The C++ strings library includes support for two general types of strings:}}
 
{{tr|La libreria C + + le stringhe include il supporto per due tipi generali di stringhe:|The C++ strings library includes support for two general types of strings:}}
  
* {{tr|{{c|std::basic_string}} - una classe basato su modelli progettati per manipolare le stringhe di qualsiasi tipo di carattere.|{{c|std::basic_string}} - a templated class designed to manipulate strings of any character type.}}
+
* {{tr|{{|std::basic_string}} - una classe su modelli progettati per manipolare le stringhe di qualsiasi tipo di carattere.|{{|std::basic_string}} - a templated class designed to manipulate strings of any character type.}}
 
* {{tr|Null-stringhe terminate - array di caratteri terminati da uno speciale'' carattere'' nullo.|Null-terminated strings - arrays of characters terminated by a special ''null'' character.}}
 
* {{tr|Null-stringhe terminate - array di caratteri terminati da uno speciale'' carattere'' nullo.|Null-terminated strings - arrays of characters terminated by a special ''null'' character.}}
  
=== {{c|std::basic_string}} ===
+
=== {{|std::basic_string}} ===
{{tr|Il {{c|std::basic_string}} classe basato su modelli generalizza come sequenze di caratteri vengono manipolati e immagazzinati. String creazione, la manipolazione e la distruzione sono tutte gestite da un pratico set di metodi di classe e delle relative funzioni.|The templated class {{c|std::basic_string}} generalizes how sequences of characters are manipulated and stored.  String creation, manipulation, and destruction are all handled by a convenient set of class methods and related functions.}}
+
{{tr|Il {{|std::basic_string}} classe su modelli generalizza come sequenze di caratteri vengono manipolati e immagazzinati. String creazione, la manipolazione e la distruzione sono tutte gestite da un pratico set di metodi di classe e delle relative funzioni.|The templated class {{|std::basic_string}} generalizes how sequences of characters are manipulated and stored.  String creation, manipulation, and destruction are all handled by a convenient set of class methods and related functions.}}
  
{{tr|Specializzazioni Diversi {{c|std::basic_string}} sono previste per i tipi di uso comune:|Several specializations of {{c|std::basic_string}} are provided for commonly-used types:}}
+
{{tr|Specializzazioni Diversi {{|std::basic_string}} sono previste per i tipi di uso comune:|Several specializations of {{|std::basic_string}} are provided for commonly-used types:}}
  
{{dcl list begin}}
+
{{begin}}
{{dcl list header | string}}
+
{{header | string}}
{{dcl list hitem |{{tr| Tipo | Type }}| Definition}}
+
{{hitem |{{tr| Tipo | Type }}| Definition}}
{{dcl list item | {{c|std::string}} | {{c|std::basic_string<char>}}}}
+
{{| {{|std::string}} | {{c|std::basic_string<char>}}}}
{{dcl list item | {{c|std::wstring}} | {{c|std::basic_string<wchar_t>}}}}
+
{{| {{|std::wstring}} | {{c|std::basic_string<wchar_t>}}}}
{{dcl list item | {{c|std::u16string}} | {{c|std::basic_string<char16_t>}} | notes={{mark since c++11}}}}
+
{{| {{|std::u16string}} | {{c|std::basic_string<char16_t>}} | notes={{mark since c++11}}}}
{{dcl list item | {{c|std::u32string}} | {{c|std::basic_string<char32_t>}} | notes={{mark since c++11}}}}
+
{{| {{|std::u32string}} | {{c|std::basic_string<char32_t>}} | notes={{mark since c++11}}}}
{{dcl list end}}
+
{{end}}
  
 
===Null-stringhe terminate===
 
===Null-stringhe terminate===
Riga 33: Riga 33:
 
===Supporto aggiuntivo===
 
===Supporto aggiuntivo===
 
===={{rl| char_traits}}====
 
===={{rl| char_traits}}====
{{tr|La libreria fornisce anche stringa modello {{rlt|char_traits}} classe che definisce i tipi e le funzioni per {{c|std::basic_string}}. Le specializzazioni sono definiti i seguenti:|The string library also provides class template {{rlt|char_traits}} that defines types and functions for {{c|std::basic_string}}. The following specializations are defined:}}
+
{{tr|La libreria fornisce anche stringa modello {{rlt|char_traits}} classe che definisce i tipi e le funzioni per {{|std::basic_string}}. Le specializzazioni sono definiti i seguenti:|The string library also provides class template {{rlt|char_traits}} that defines types and functions for {{|std::basic_string}}. The following specializations are defined:}}
  
{{ddcl list begin}}
+
{{begin}}
{{ddcl list header | string}}
+
{{header | string}}
{{ddcl list item | notes=<br><br>{{mark since c++11}}<br>{{mark since c++11}} |
+
{{| notes=<br><br>{{mark since c++11}}<br>{{mark since c++11}} |
 
template<> class char_traits<std::string>;
 
template<> class char_traits<std::string>;
 
template<> class char_traits<std::wstring>;
 
template<> class char_traits<std::wstring>;
Riga 43: Riga 43:
 
template<> class char_traits<std::u32string>;
 
template<> class char_traits<std::u32string>;
 
}}
 
}}
{{ddcl list end}}
+
{{end}}
  
 
[[ar:cpp/string]]
 
[[ar:cpp/string]]

Versione attuale delle 03:06, 9 lug 2013


 
 
Stringhe libreria
Null-stringhe terminate
Original:
Null-terminated strings
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Byte stringhe
Multibyte stringhe
Stringhe larghe
Classi
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string
char_traits
 
La libreria C + + le stringhe include il supporto per due tipi generali di stringhe:
Original:
The C++ strings library includes support for two general types of strings:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • std::basic_string - una classe basata su modelli progettati per manipolare le stringhe di qualsiasi tipo di carattere.
    Original:
    std::basic_string - a templated class designed to manipulate strings of any character type.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Null-stringhe terminate - array di caratteri terminati da uno speciale carattere nullo.
    Original:
    Null-terminated strings - arrays of characters terminated by a special null character.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

Indice

[modifica] std::basic_string

Il std::basic_string classe basata su modelli generalizza come sequenze di caratteri vengono manipolati e immagazzinati. String creazione, la manipolazione e la distruzione sono tutte gestite da un pratico set di metodi di classe e delle relative funzioni.
Original:
The templated class std::basic_string generalizes how sequences of characters are manipulated and stored. String creation, manipulation, and destruction are all handled by a convenient set of class methods and related functions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Specializzazioni Diversi std::basic_string sono previste per i tipi di uso comune:
Original:
Several specializations of std::basic_string are provided for commonly-used types:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definizione nell'header <string>
Tipo
Original:
Type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
std::string std::basic_string<char>
std::wstring std::basic_string<wchar_t>
std::u16string std::basic_string<char16_t>
std::u32string std::basic_string<char32_t>

[modifica] Null-stringhe terminate

Terminazione Null le stringhe sono array di caratteri che vengono terminati da una speciale nullo carattere. C + + fornisce funzioni per creare, controllare e modificare stringhe null-terminate.
Original:
Null-terminated strings are arrays of characters that are terminated by a special null character. C++ provides functions to create, inspect, and modify null-terminated strings.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Ci sono tre tipi di stringhe null-terminate:
Original:
There are three types of null-terminated strings:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Supporto aggiuntivo

[modifica] char_traits

La libreria fornisce anche stringa modello char_traits classe che definisce i tipi e le funzioni per std::basic_string. Le specializzazioni sono definiti i seguenti:
Original:
The string library also provides class template char_traits that defines types and functions for std::basic_string. The following specializations are defined:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Elemento definito nell'header <string>
template<> class char_traits<std::string>;

template<> class char_traits<std::wstring>;
template<> class char_traits<std::u16string>;

template<> class char_traits<std::u32string>;


(dal C++11)
(dal C++11)