◐ Shell
clean mode source ↗

std::basic_regex::assign - cppreference.com

De cppreference.com

<metanoindex/>

<tbody> </tbody>

basic_regex& assign( const basic_regex& other );

(1) (desde C++11)

basic_regex& assign( basic_regex&& that );

(2) (desde C++11)

basic_regex& assign( const CharT* s, flag_type f = std::regex_constants::ECMAScript );

(3) (desde C++11)

basic_regex& assign( const charT* ptr, size_t count, flag_type f = regex_constants::ECMAScript );

(4) (desde C++11)

template< class ST, class SA > basic_regex& assign( const std::basic_string<CharT,ST,SA>& str, flag_type f = std::regex_constants::ECMAScript );

(5) (desde C++11)

template< class InputIt > basic_regex& assign( InputIt first, InputIt last, flag_type f = std::regex_constants::ECMAScript );

(6) (desde C++11)

basic_regex& assign( std::initializer_list<CharT> ilist, flag_type f = std::regex_constants::ECMAScript );

(7) (desde C++11)

Atribui o conteúdo para a expressão regular.

Original:

Assigns the contents to the regular expression.

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

1)

Atribui o conteúdo de other. flags() e mark_count() são equivalentes aos valores de other.flags() e other.mark_count() após a chamada.

Original:

Assigns the contents of other. flags() and mark_count() are equivalent to the values of other.flags() and other.mark_count() after the call.

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

2)

Atribui o conteúdo de other usando semântica de movimento. flags() e mark_count() são equivalentes aos valores de other.flags() other.mark_count() e antes da atribuição. Após a chamada, other está em um estado válido, mas não especificado.

Original:

Assigns the contents of other using move semantics. flags() and mark_count() are equivalent to the values of other.flags() and other.mark_count() before the assignment. After the call, other is in a valid, but unspecified state.

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

3-7)

Atribui uma seqüência de caracteres para a expressão regular. As bandeiras de sintaxe são definidos para f. mark_count() retorna o número de subexpressões marcados dentro da subexpressão resultante após a chamada.

Original:

Assigns a sequence of characters to the regular expression. The syntax flags are set to f. mark_count() returns the number of marked subexpressions within the resulting subexpression after the call.

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

3)

Atribui uma string terminada em nulo apontado por s.

Original:

Assigns a null-terminated string pointed to by s.

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

4)

Atribui uma seqüência de caracteres count, apontado pelo s.

Original:

Assigns a sequence of count characters, pointed to by s.

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

5)

Atribui o str cadeia.

Original:

Assigns the string str.

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

6)

Atribui os caracteres na faixa [first, last).

Original:

Assigns the characters in the range [first, last).

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

7)

Atribui os personagens do ilist lista de inicializador.

Original:

Assigns the characters in the initializer list ilist.

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

Parâmetros

other -

outra expressão regular para atribuir

Original:

another regular expression to assign

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

s -

ponteiro para uma seqüência de caracteres para atribuir

Original:

pointer to a character sequence to assign

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

str -

String para atribuir

Original:

string to assign

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

first, last -

o intervalo de caracteres para atribuir

Original:

the range of characters to assign

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

ilist -

lista de inicializador contendo caracteres atribuir

Original:

initializer list containing characters to assign

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

Type requirements
-InputIt must meet the requirements of InputIterator.

Valor de retorno

*this

Exceções

1)

(Nenhum)

Original:

(none)

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

3-7)

std::regex_error se a expressão fornecido regular não é válido. O objeto não é modificado nesse caso.

Original:

std::regex_error if the supplied regular expression is not valid. The object is not modified in that case.

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

Exemplo

Veja também

atribui o conteúdo

Original:

assigns the contents

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


(função pública membro) [edit]