mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 21:11:25 +12:00
Use more starts_with/ends_with.
Remove ends_with global func.
This commit is contained in:
parent
90f4023cb8
commit
f08c778d2c
11 changed files with 24 additions and 30 deletions
|
@ -25,12 +25,6 @@ inline void strcpy_trunc(char (&dst)[N], const char (&src)[N2])
|
|||
std::memset(dst + count, 0, N - count);
|
||||
}
|
||||
|
||||
template <std::size_t N>
|
||||
inline bool ends_with(const std::string& src, const char (&end)[N])
|
||||
{
|
||||
return src.size() >= N - 1 && src.compare(src.size() - (N - 1), N - 1, end, N - 1) == 0;
|
||||
}
|
||||
|
||||
namespace fmt
|
||||
{
|
||||
std::string replace_first(const std::string& src, const std::string& from, const std::string& to);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue