Core/StringExt: Add Substring family of function (unicode-aware)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
namespace Nz
|
||||
@@ -109,6 +110,11 @@ namespace Nz
|
||||
return str;
|
||||
}
|
||||
|
||||
std::string_view Substring(std::string_view str, std::size_t index, UnicodeAware)
|
||||
{
|
||||
return Substring(str, index, std::numeric_limits<std::size_t>::max(), UnicodeAware{});
|
||||
}
|
||||
|
||||
inline bool StartsWith(std::string_view str, std::string_view s)
|
||||
{
|
||||
#if NAZARA_CPP_VER >= NAZARA_CPP20
|
||||
|
||||
Reference in New Issue
Block a user