kennen:lib:search
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
— | kennen:lib:search [2020-06-14 15:18] (aktuell) – angelegt - Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== search() ====== | ||
+ | ''# | ||
+ | |||
+ | <code cpp> | ||
+ | For search (For first, For last, For2 first2, For2 last2) | ||
+ | For search (For first, For last, For2 first2, For2 last2, Binary pred) | ||
+ | |||
+ | For search (Exec pol, For first, For last, For2 first2, For2 last2) | ||
+ | For search (Exec pol, For first, For last, For2 first2, For2 last2, Binary pred) | ||
+ | |||
+ | Range ranges:: | ||
+ | Range ranges:: | ||
+ | |||
+ | For search (For first, For last, For2 first2, For2 last2, Searcher searcher) // C++17 | ||
+ | </ | ||
+ | Sucht den Anfang eines Teilbereiches aus [first, | ||
+ | der mit [first2, | ||
+ | dem Muster eines [[# | ||
+ | |||
+ | |||
+ | ==== Parameter ==== | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | |||
+ | ==== Ergebnis ==== | ||
+ | Rückgabewert: | ||
+ | |||
+ | ==== Siehe auch ==== | ||
+ | [[find_end]], | ||
+ | [[search_n]]. | ||
+ | |||
+ | ==== Beispiel ==== | ||
+ | <code cpp search.cpp> | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | int main() | ||
+ | { | ||
+ | std::string s = "Hallo Welt"; | ||
+ | std::string sequence = " | ||
+ | std::cout << s << ' | ||
+ | |||
+ | auto pos = std:: | ||
+ | [](char a, char b) { return std:: | ||
+ | ); | ||
+ | |||
+ | std::cout << " " << std:: | ||
+ | << " " << sequence << ' | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== Sucher ==== | ||
+ | [[..: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | Die Angabe eines zweistelligen Prädikats anstelle von '' | ||
+ | <code cpp searcher.cpp> | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | int main() | ||
+ | { | ||
+ | std::string s = "Hallo Welt"; | ||
+ | std::string sequence = " | ||
+ | std::cout << s << ' | ||
+ | |||
+ | auto pos = std:: | ||
+ | std:: | ||
+ | ); | ||
+ | |||
+ | std::cout << " " << std:: | ||
+ | << " " << sequence << ' | ||
+ | return 0; | ||
+ | } | ||
+ | </ | ||
kennen/lib/search.txt · Zuletzt geändert: 2020-06-14 15:18 von 127.0.0.1