Improve wxRegEx::GetMatch() return value documentation
Don't imply that the function returns false for the empty capture groups because this is not the case (and never was). See #22708. (cherry picked from commit 537f11fd4d258d11454a75fa5891e4f011ff0da5)
This commit is contained in:
parent
37d421ece9
commit
475f66e246
@ -240,8 +240,12 @@ public:
|
|||||||
May only be called after successful call to Matches() and only if @c wxRE_NOSUB
|
May only be called after successful call to Matches() and only if @c wxRE_NOSUB
|
||||||
was @b not used in Compile().
|
was @b not used in Compile().
|
||||||
|
|
||||||
Returns @false if no match or if an error occurred.
|
This function only returns @false if the regex didn't match at all or
|
||||||
|
one of the arguments is invalid (e.g. @a index is greater or equal than
|
||||||
|
the number of captures) and returns @true in all the other cases, even
|
||||||
|
if the corresponding capture group didn't match anything, which can be
|
||||||
|
the case when using captures in different alternation (@c "|"). In this
|
||||||
|
case the returned @a len is @c 0 and @a start is @c -1.
|
||||||
*/
|
*/
|
||||||
bool GetMatch(size_t* start, size_t* len, size_t index = 0) const;
|
bool GetMatch(size_t* start, size_t* len, size_t index = 0) const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user