wxString is a class in the wxWidgets package library for C++ that represents a string of characters. It provides various methods to perform different operations on strings. One of these methods is Contains() which returns true if the given substring is present in the string or false otherwise.
Here are some code examples using Contains() method:
Example 1: Check if a substring is present in a string wxString str = "hello world"; bool found = str.Contains("world"); // Returns true
Example 2: Check if a substring is case-insensitively present in a string wxString str = "Hello World"; bool found = str.Lower().Contains("world"); // Returns true
Example 3: Check if a substring is present in a string starting from a specific position wxString str = "hello world"; bool found = str.Contains("o", 5); // Returns true
In these examples, the Contains() method is used to search for a substring in a wxString object. The second parameter of the function is optional and specifies the starting index of the search.
Therefore, wxString is a part of the wxWidgets package library for C++.
C++ (Cpp) wxString::Contains - 30 examples found. These are the top rated real world C++ (Cpp) examples of wxString::Contains extracted from open source projects. You can rate examples to help us improve the quality of examples.