cc_project_template_bazel

A Bazel, ninja, and googletest-based C++ project template
git clone https://git.bracken.jp/cc_project_template_bazel.git
Log | Files | Refs | README | LICENSE

bar.cc (325B)


      1 #include "bar.h"
      2 
      3 #include <string>
      4 
      5 #include "absl/strings/str_cat.h"
      6 #include "absl/strings/string_view.h"
      7 
      8 namespace foobar {
      9 
     10 std::string Bar(absl::string_view name) {
     11   std::string greeting = "Hello";
     12   if (name.size() >= 1) {
     13     absl::StrAppend(&greeting, ", ", name);
     14   }
     15   return greeting;
     16 }
     17 
     18 }  // namespace foobar