Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement MISC::ends_with(haystack, needle) (#1244)
haystackの末尾がneedleと一致するかチェックする文字列の操作を 実装します。合わせてテストケースを追加し動作を確認します。 新しい規格のC++20には同等の操作を行うメンバー関数 `std::string::ends_with()`や`std::string_view::ends_with()`が ありますがJDimが利用する規格はC++17であるため自前で実装します。
- Loading branch information
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters