Shows how to use xtd::linq::take_while method.
#include <xtd/xtd>
auto main() -> int {
auto fruits = array {"apple", "banana", "mango", "orange", "passionfruit", "grape"};
auto query = fruits.take_while([](auto&& fruit) {return string::compare("orange", fruit, true) != 0;}).to_array();
for (auto fruit : query)
println(fruit);
}