Open Liam0205 opened 5 years ago
https://liam.page/2017/12/14/the-missing-starts-with-and-ends-with-in-Cpp-for-std-string/
这是一篇简短的记录。 C++ 标准模板库的 std::string 很好很强大,但是并没有提供判断一个字符串是否以另一个字符串开始/结束的接口。这里为 std::basic_string<charT> 提供这两个接口。
https://liam.page/2017/12/14/the-missing-starts-with-and-ends-with-in-Cpp-for-std-string/
这是一篇简短的记录。 C++ 标准模板库的 std::string 很好很强大,但是并没有提供判断一个字符串是否以另一个字符串开始/结束的接口。这里为 std::basic_string<charT> 提供这两个接口。