Home » U++ Library support » U++ Core » Index find on complex match
Index find on complex match [message #47075] |
Tue, 29 November 2016 05:32 |
kr8vzn
Messages: 4 Registered: May 2013 Location: Australia
|
Junior Member |
|
|
Hi,
I have the following structure and would like to find complex matches to any item of the structure
struct Test : Moveable<Test>
{
unsigned u;
String a;
String b;
String c;
bool f;
static unsigned u_counter;
Test() {u = u_counter; u_counter++; f = true;};
Test(String s1, String s2 = "", String s3 = "")
{u = u_counter; u_counter++; a = s1; b = s2; c = s3; f = true;};
};
unsigned Test::u_counter = 1;
CONSOLE_APP_MAIN
{
Index<Test> tests;
tests.Add(Test("String1"));
tests.Add(Test("band"));
tests.Add(Test("String3","and"));
}
I would like to be able to have
tests.Find(String(..));
with find "and" matching "band" and "and"
or find "Str" matching "String1" and "String2"
Is there a way to do this with existing functions?
|
|
|
Goto Forum:
Current Time: Sun Apr 27 20:16:43 CEST 2025
Total time taken to generate the page: 0.03878 seconds
|