diff options
author | Murray Cumming <murrayc@murrayc.com> | 2016-02-26 10:45:15 +0100 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2016-02-26 10:45:15 +0100 |
commit | 249bdd539ab05aab98bc417f579524b4e988faef (patch) | |
tree | c98b5ae0b6068d1c33a6e6040928fc25ad748163 /examples/regex | |
parent | 942cdcb3d74ba9cd4fc702153715b503d63aa395 (diff) | |
download | glibmm-249bdd539ab05aab98bc417f579524b4e988faef.tar.gz |
Run clang-format on the examples.
Diffstat (limited to 'examples/regex')
-rw-r--r-- | examples/regex/main.cc | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/examples/regex/main.cc b/examples/regex/main.cc index ed6ac567..e634fe5e 100644 --- a/examples/regex/main.cc +++ b/examples/regex/main.cc @@ -16,30 +16,25 @@ */ #include <glibmm.h> -#include <iostream> #include <iomanip> +#include <iostream> -int main(int, char**) +int +main(int, char**) { Glib::init(); /* Reusing one regex pattern: */ const auto regex = Glib::Regex::create("(a)?(b)"); - std::cout << "Pattern=" << regex->get_pattern() - << ", with string=abcd, result=" - << std::boolalpha << regex->match("abcd") - << std::endl; - std::cout << "Pattern=" << regex->get_pattern() - << ", with string=1234, result=" - << std::boolalpha << regex->match("1234") - << std::endl; + std::cout << "Pattern=" << regex->get_pattern() << ", with string=abcd, result=" << std::boolalpha + << regex->match("abcd") << std::endl; + std::cout << "Pattern=" << regex->get_pattern() << ", with string=1234, result=" << std::boolalpha + << regex->match("1234") << std::endl; std::cout << std::endl; /* Using the static function without a regex instance: */ - std::cout << "Pattern=b* with string=abcd, result=" - << std::boolalpha << Glib::Regex::match_simple("b*", "abcd") - << std::endl; + std::cout << "Pattern=b* with string=abcd, result=" << std::boolalpha + << Glib::Regex::match_simple("b*", "abcd") << std::endl; return 0; } - |