Document that range for can be used for wxString iteration
This is simpler and better than using iterators.
This commit is contained in:
parent
73ad17db4e
commit
eb4e75f8c3
1 changed files with 12 additions and 0 deletions
|
|
@ -296,6 +296,18 @@ for (i = s.begin(); i != s.end(); ++i)
|
|||
}
|
||||
@endcode
|
||||
|
||||
or, even simpler, range for loop:
|
||||
@code
|
||||
wxString s = "hello";
|
||||
for ( auto c : s )
|
||||
{
|
||||
// do something with "c"
|
||||
}
|
||||
@endcode
|
||||
|
||||
@note wxString iterators have unusual proxy-like semantics and can be used to
|
||||
modify the string even when @e not using references, i.e. with just @c
|
||||
auto, as in the example above.
|
||||
|
||||
|
||||
@section overview_string_related String Related Functions and Classes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue