MCPcopy Create free account
hub / github.com/andreasfertig/programming-with-cpp20 / main

Function main

10.20-startsWith1/main.cpp:6–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include <string>
5
6int main()
7{
8 const std::string s{"Hello, C++20"};
9
10 if(s.starts_with("Hello")) { puts("Found!"); }
11
12 if(s.ends_with("C++20")) { puts("Found!"); }
13}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected