名前空間
変種
操作

std::sub_match::operator string_type, std::sub_match::str

提供: cppreference.com
< cpp‎ | regex‎ | sub match

 
 
正規表現ライブラリ
クラス
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_regex(C++11)
sub_match(C++11)
match_results(C++11)
アルゴリズム
Original:
Algorithms
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_match(C++11)
regex_search(C++11)
regex_replace(C++11)
イテレータ
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_iterator(C++11)
regex_token_iterator(C++11)
例外
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_error(C++11)
形質
Original:
Traits
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_traits(C++11)
定数
Original:
Constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
syntax_option_type(C++11)
match_flag_type(C++11)
error_type(C++11)
 
std::sub_match
メンバ関数
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.
sub_match::sub_match(C++11)
sub_match::length(C++11)
sub_match::str
sub_match::operator string_type
(C++11)
sub_match::compare(C++11)
非メンバ関数
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.
operator==
operator!=
operator<<
operator<=
operator>
operator>=
(C++11)
operator<<(C++11)
 
operator string_type() const;
(1)
string_type str() const;
(2)
1)
暗黙のうちに基礎std::basic_string型のオブジェクトに変換します.
Original:
Implicitly converts to an object of the underlying std::basic_string type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
明示的基礎std::basic_string型のオブジェクトに変換します.
Original:
Explicitly converts to an object of the underlying std::basic_string type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

[編集] パラメータ

(なし)
Original:
(none)
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型のオブジェクトとしてマッチした文字シーケンスを返します。 matchedメンバーが' falseの場合、空の文字列が返されます.
Original:
Returns the matched character sequence as an object of the underlying std::basic_string type. If the matched member is false then the empty string is returned.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 複雑

基本となる文字列の長さの線形.
Original:
Linear in the length of the underlying character sequence.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集]

std::ssub_match sm;
std::string s = sm;  // implicit conversion
std::cout << s.length() << '\n';

Output:

​0​