feat(string): add functions to categorize strings

This commit is contained in:
2024-11-10 19:24:40 +08:00
parent 7a80a80a12
commit 09bbcecc28
4 changed files with 83 additions and 2 deletions

View File

@ -49,7 +49,7 @@ struct TStringHelper
if constexpr (CArithmetic<U>)
{
constexpr const T* DigitToChar = LITERAL(T, "9876543210123456789");
constexpr size_t ZeroIndex = 9;
constexpr size_t ZeroIndex = 9;
if constexpr (CSameAs<U, bool>)
{
@ -452,7 +452,7 @@ struct TStringHelper
if (IndexLength != 0)
{
if (PlaceholderIndex.FindFirstNotOf(LITERAL(T, "0123456789")) != INDEX_NONE)
if (!PlaceholderIndex.IsNumeric())
{
checkf(false, TEXT("Invalid placeholder index."));