Espacios de nombres
Variantes
Acciones

std::basic_string::c_str

De cppreference.com
< cpp‎ | string‎ | basic string
 
 
Strings biblioteca
Terminadas en nulo
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.
Cadenas de bytes
Multibyte cuerdas
Cadenas anchas
Clases
Original:
Classes
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
Las funciones miembro
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Elemento acceso
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string::c_str
Los iteradores
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Capacidad
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Operaciones
Original:
Operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Buscar
Original:
Search
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Constantes
Original:
Constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Terceros funciones
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)(C++11)(C++11)
(C++11)(C++11)
(C++11)(C++11)(C++11)
(C++11)
(C++11)
Clases de ayuda
Original:
Helper classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
const CharT* c_str() const;
Devuelve un puntero a una matriz de caracteres terminada en nulo con los datos equivalentes a los que están almacenados en la cadena. El puntero es tal que el [c_str(); c_str() + size()] rango es válida y los valores que corresponden a los valores almacenados en la cadena con un carácter nulo adicional después de la última posición .
Original:
Returns a pointer to a null-terminated character array with data equivalent to those stored in the string. The pointer is such that the range [c_str(); c_str() + size()] is valid and the values in it correspond to the values stored in the string with an additional null character after the last position.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar] Notas

El puntero obtenido de c_str() sólo se puede tratar como un puntero a una cadena de caracteres terminada en nulo si el objeto de cadena no contiene otros caracteres nulos .
Original:
The pointer obtained from c_str() may only be treated as a pointer to a null-terminated character string if the string object does not contain other null characters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
La escritura en la matriz de caracteres se accede a través c_str() es un comportamiento indefinido .
Original:
Writing to the character array accessed through c_str() is undefined behavior.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Puesto que C + 11, c_str() y data() realizar la misma función .
Original:
Since C++11, c_str() and data() perform the same function.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Parámetros

(Ninguno)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Valor de retorno

Puntero a la matriz de caracteres terminada en nulo tal que para cada data()[i] == operator[](i) i en [0, size()]. (hasta C++11)
Original:
Pointer to the null-terminated character array such that data()[i] == operator[](i) for every i in [0, size()]. (hasta C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Puntero al almacenamiento de caracteres subyacente, que data() + i == &operator[](i) para cada i en [0, size()]. (desde C++11)
Original:
Pointer to the underlying character storage such that data() + i == &operator[](i) for every i in [0, size()]. (desde C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Complejidad

Constante .
Original:
Constant.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Excepciones

noexcept specification:  
noexcept
  (desde C++11)

[editar] Ver también

(C++11)
accede al primer carácter
Original:
accesses the first character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro público) [editar]
(C++11)
accede al último carácter
Original:
accesses the last character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro público) [editar]
devuelve un puntero al primer carácter de una cadena
Original:
returns a pointer to the first character of a string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro público) [editar]