Skip to content

Commit 5a505c7

Browse files
author
mtx48109
committed
stubs match-results-class
1 parent 66f0da6 commit 5a505c7

File tree

1 file changed

+48
-62
lines changed

1 file changed

+48
-62
lines changed

docs/standard-library/match-results-class.md

Lines changed: 48 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -19,41 +19,8 @@ Holds a sequence of submatches.
1919
## Syntax
2020

2121
```cpp
22-
class match_results {
23-
public:
24-
explicit match_results(const Alloc& alloc = Alloc());
25-
match_results(const match_results& right);
26-
match_results& operator=(const match_results& right);
27-
difference_type position(size_type sub = 0) const;
28-
difference_type length(size_type sub = 0) const;
29-
string_type str(size_type sub = 0) const;
30-
const_reference operator[](size_type n) const;
31-
const_reference prefix() const;
32-
const_reference suffix() const;
33-
const_iterator begin() const;
34-
const_iterator end() const;
35-
template <class OutIt>
36-
OutIt format(OutIt out,
37-
const string_type& fmt, match_flag_type flags = format_default) const;
38-
string_type format(const string_type& fmt,
39-
match_flag_type flags = format_default) const;
40-
allocator_type get_allocator() const;
41-
void swap(const match_results& other) throw();
42-
size_type size() const;
43-
size_type max_size() const;
44-
bool empty() const;
45-
typedef sub_match<BidIt>
46-
value_type;
47-
typedef const typename Alloc::const_reference const_reference;
48-
typedef const_reference reference;
49-
typedef T0 const_iterator;
50-
typedef const_iterator iterator;
51-
typedef typename iterator_traits<BidIt>::difference_type difference_type;
52-
typedef typename Alloc::size_type size_type;
53-
typedef Alloc allocator_type;
54-
typedef typename iterator_traits<BidIt>::value_type char_type;
55-
typedef basic_string<char_type> string_type;
56-
};
22+
template <class BidIt, class Alloc>
23+
class match_results
5724
```
5825
5926
### Parameters
@@ -68,6 +35,52 @@ The type of an allocator for managing storage.
6835
6936
The template class describes an object that controls a non-modifiable sequence of elements of type `sub_match<BidIt>` generated by a regular expression search. Each element points to the subsequence that matched the capture group corresponding to that element.
7037
38+
### Constructors
39+
40+
|Constructor|Description|
41+
|-|-|
42+
|[match_results](#match_results)|Constructs the object.|
43+
44+
### Typedefs
45+
46+
|Type name|Description|
47+
|-|-|
48+
|[allocator_type](#allocator_type)|The type of an allocator for managing storage.|
49+
|[char_type](#char_type)|The type of an element.|
50+
|[const_iterator](#const_iterator)|The const iterator type for submatches.|
51+
|[const_reference](#const_reference)|The type of an element const reference.|
52+
|[difference_type](#difference_type)|The type of an iterator difference.|
53+
|[iterator](#iterator)|The iterator type for submatches.|
54+
|[reference](#reference)|The type of an element reference.|
55+
|[size_type](#size_type)|The type of a submatch count.|
56+
|[string_type](#string_type)|The type of a string.|
57+
|[value_type](#value_type)|The type of a submatch.|
58+
59+
### Member functions
60+
61+
|Member function|Description|
62+
|-|-|
63+
|[begin](#begin)|Designates beginning of submatch sequence.|
64+
|[empty](#empty)|Tests for no submatches.|
65+
|[end](#end)|Designates end of submatch sequence.|
66+
|[format](#format)|Formats submatches.|
67+
|[get_allocator](#get_allocator)|Returns the stored allocator.|
68+
|[length](#length)|Returns length of a submatch.|
69+
|[max_size](#max_size)|Gets largest number of submatches.|
70+
|[position](#position)|Get starting offset of a subgroup.|
71+
|[prefix](#prefix)|Gets sequence before first submatch.|
72+
|[size](#size)|Counts number of submatches.|
73+
|[str](#str)|Returns a submatch.|
74+
|[suffix](#suffix)|Gets sequence after last submatch.|
75+
|[swap](#swap)|Swaps two match_results objects.|
76+
77+
### Operators
78+
79+
|Operator|Description|
80+
|-|-|
81+
|[operator=](#op_eq)|Copy a match_results object.|
82+
|[operator[]](#op_at)|Access a subobject.|
83+
7184
## Requirements
7285
7386
**Header:** \<regex>
@@ -165,7 +178,6 @@ int main()
165178

166179
return (0);
167180
}
168-
169181
```
170182
171183
```Output
@@ -286,7 +298,6 @@ int main()
286298

287299
return (0);
288300
}
289-
290301
```
291302
292303
```Output
@@ -407,7 +418,6 @@ int main()
407418

408419
return (0);
409420
}
410-
411421
```
412422
413423
```Output
@@ -528,7 +538,6 @@ int main()
528538

529539
return (0);
530540
}
531-
532541
```
533542
534543
```Output
@@ -649,7 +658,6 @@ int main()
649658

650659
return (0);
651660
}
652-
653661
```
654662
655663
```Output
@@ -770,7 +778,6 @@ int main()
770778

771779
return (0);
772780
}
773-
774781
```
775782
776783
```Output
@@ -891,7 +898,6 @@ int main()
891898

892899
return (0);
893900
}
894-
895901
```
896902
897903
```Output
@@ -1012,7 +1018,6 @@ int main()
10121018

10131019
return (0);
10141020
}
1015-
10161021
```
10171022
10181023
```Output
@@ -1051,7 +1056,6 @@ template <class OutIt>
10511056
OutIt format(OutIt out,
10521057
const string_type& fmt, match_flag_type flags = format_default) const;
10531058

1054-
10551059
string_type format(const string_type& fmt, match_flag_type flags = format_default) const;
10561060
```
10571061
@@ -1154,7 +1158,6 @@ int main()
11541158
11551159
return (0);
11561160
}
1157-
11581161
```
11591162

11601163
```Output
@@ -1275,7 +1278,6 @@ int main()
12751278

12761279
return (0);
12771280
}
1278-
12791281
```
12801282
12811283
```Output
@@ -1396,7 +1398,6 @@ int main()
13961398

13971399
return (0);
13981400
}
1399-
14001401
```
14011402
14021403
```Output
@@ -1522,7 +1523,6 @@ int main()
15221523
15231524
return (0);
15241525
}
1525-
15261526
```
15271527

15281528
```Output
@@ -1653,7 +1653,6 @@ int main()
16531653
16541654
return (0);
16551655
}
1656-
16571656
```
16581657

16591658
```Output
@@ -1774,7 +1773,6 @@ int main()
17741773

17751774
return (0);
17761775
}
1777-
17781776
```
17791777
17801778
```Output
@@ -1900,7 +1898,6 @@ int main()
19001898

19011899
return (0);
19021900
}
1903-
19041901
```
19051902
19061903
```Output
@@ -2026,7 +2023,6 @@ int main()
20262023

20272024
return (0);
20282025
}
2029-
20302026
```
20312027
20322028
```Output
@@ -2152,7 +2148,6 @@ int main()
21522148
21532149
return (0);
21542150
}
2155-
21562151
```
21572152

21582153
```Output
@@ -2273,7 +2268,6 @@ int main()
22732268

22742269
return (0);
22752270
}
2276-
22772271
```
22782272
22792273
```Output
@@ -2394,7 +2388,6 @@ int main()
23942388

23952389
return (0);
23962390
}
2397-
23982391
```
23992392
24002393
```Output
@@ -2515,7 +2508,6 @@ int main()
25152508

25162509
return (0);
25172510
}
2518-
25192511
```
25202512
25212513
```Output
@@ -2636,7 +2628,6 @@ int main()
26362628

26372629
return (0);
26382630
}
2639-
26402631
```
26412632
26422633
```Output
@@ -2762,7 +2753,6 @@ int main()
27622753
27632754
return (0);
27642755
}
2765-
27662756
```
27672757

27682758
```Output
@@ -2883,7 +2873,6 @@ int main()
28832873

28842874
return (0);
28852875
}
2886-
28872876
```
28882877
28892878
```Output
@@ -3004,7 +2993,6 @@ int main()
30042993

30052994
return (0);
30062995
}
3007-
30082996
```
30092997
30102998
```Output
@@ -3130,7 +3118,6 @@ int main()
31303118
31313119
return (0);
31323120
}
3133-
31343121
```
31353122

31363123
```Output
@@ -3251,7 +3238,6 @@ int main()
32513238

32523239
return (0);
32533240
}
3254-
32553241
```
32563242
32573243
```Output

0 commit comments

Comments
 (0)