Added "rest" argument to wxString::Before{First,Last}().
This allows to search the string just once, in BeforeXXX(), when both the parts of the string before and after some character are needed instead of having to do it twice in both BeforeXXX() and AfterXXX(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2210,11 +2210,13 @@ public:
|
||||
// get last nCount characters
|
||||
wxString Right(size_t nCount) const;
|
||||
// get all characters before the first occurrence of ch
|
||||
// (returns the whole string if ch not found)
|
||||
wxString BeforeFirst(wxUniChar ch) const;
|
||||
// (returns the whole string if ch not found) and also put everything
|
||||
// following the first occurrence of ch into rest if it's non-NULL
|
||||
wxString BeforeFirst(wxUniChar ch, wxString *rest = NULL) const;
|
||||
// get all characters before the last occurrence of ch
|
||||
// (returns empty string if ch not found)
|
||||
wxString BeforeLast(wxUniChar ch) const;
|
||||
// (returns empty string if ch not found) and also put everything
|
||||
// following the last occurrence of ch into rest if it's non-NULL
|
||||
wxString BeforeLast(wxUniChar ch, wxString *rest = NULL) const;
|
||||
// get all characters after the first occurrence of ch
|
||||
// (returns empty string if ch not found)
|
||||
wxString AfterFirst(wxUniChar ch) const;
|
||||
|
Reference in New Issue
Block a user