Espacios de nombres
Variantes
Acciones

std::ws

De cppreference.com
< cpp‎ | io‎ | manip

 
 
Entrada / salida de la biblioteca
I / O manipuladores
C-estilo I / O
Buffers
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf(obsoleto)
Arroyos
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Abstracciones
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
File I / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream
basic_ofstream
basic_fstream
Cadena de I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istringstream
basic_ostringstream
basic_stringstream
Matriz I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istrstream(obsoleto)
ostrstream(obsoleto)
strstream(obsoleto)
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff
streamsize
fpos
Error interfaz categoría
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iostream_category(C++11)
io_errc(C++11)
 
Entrada / salida manipuladores
De punto flotante de formato
Original:
Floating-point formatting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Formato Integer
Original:
Integer formatting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Formato booleano
Original:
Boolean formatting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
boolalpha
noboolalpha
Ancho de campo y de control de llenado
Original:
Field width and fill control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Otros formatos
Original:
Other formatting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Los espacios en blanco de procesamiento
Original:
Whitespace processing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ws
ends
Salida de lavado
Original:
Output flushing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Indicadores de estado manipulación
Original:
Status flags manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tiempo y dinero I / O
Original:
Time and money I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
get_money(C++11)
get_time(C++11)
put_money(C++11)
put_time(C++11)
 
Defined in header <istream>
template< class CharT, class Traits >
std::basic_istream<CharT,Traits>& ws( std::basic_istream<CharT, Traits>& is );
Descarta los principales espacios en blanco de un flujo de entrada .
Original:
Discards leading whitespace from an input stream.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se comporta como un UnformattedInputFunction, excepto que is.gcount() no se modifica. Después de la construcción y comprobación del objeto centinela, extrae los caracteres de la secuencia y los descarta hasta que cualquiera de las siguientes condiciones:
Original:
Behaves as an UnformattedInputFunction, except that is.gcount() is not modified. After constructing and checking the sentry object, extracts characters from the stream and discards them until any one of the following conditions occurs:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • condición de fin de archivo se produce en la secuencia de entrada (en cuyo caso la función llama setstate(eofbit) pero no establece failbit .
    Original:
    end of file condition occurs in the input sequence (in which case the function calls setstate(eofbit) but does not set failbit.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • c el siguiente carácter disponible en la secuencia de entrada no es un espacio en blanco como se determina por std::isspace(c, is.getloc()). El personaje no está en blanco no es extraído .
    Original:
    the next available character c in the input sequence is not whitespace as determined by std::isspace(c, is.getloc()). The non-whitespace character is not extracted.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Este es un manipulador de sólo entrada de E / S, puede ser llamada con una expresión como in << std::ws para cualquier tipo de in std::basic_istream .
Original:
This is an input-only I/O manipulator, it may be called with an expression such as in << std::ws for any in of type std::basic_istream.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar] Parámetros

is -
referencia a la secuencia de entrada
Original:
reference to input stream
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

is (referencia a la corriente después de la extracción de los espacios consecutivos)
Original:
is (reference to the stream after extraction of consecutive whitespace)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Ejemplo

#include <iostream>
#include <sstream>
int main()
{
    std::istringstream s("     this is a test");
    std::string line;
    s >> std::ws;
    getline(s, line);
    std::cout << "ws + getline returns: \"" << line << "\"\n";
}

Output:

ws + getline returns: "this is a test"

[editar] Ver también

extractos y caracteres descartes hasta que el carácter dado se encuentra
Original:
extracts and discards characters until the given character is found
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::basic_istream función) [edit]