feat(cpp-object-oriented-modular-refactoring): step 11 - source-target-resolver

This commit is contained in:
KOKO\Mimi
2026-08-16 08:34:09 +09:00
parent 5430fffd62
commit a6324a9004
12 changed files with 714 additions and 273 deletions
+28
View File
@@ -0,0 +1,28 @@
#ifndef FESA_CORE_ASCII_H_
#define FESA_CORE_ASCII_H_
#include <cstdint>
#include <string_view>
#include "fesa/core/status.h"
namespace fesa {
/// @brief Converts one ASCII uppercase byte to lowercase.
/// @return The lowercase ASCII byte, or the input byte when it is not A-Z.
char AsciiLower(char value) noexcept;
/// @brief Compares two byte strings with ASCII-only case folding.
/// @return True when the strings have equal length and equal ASCII-folded
/// bytes.
bool AsciiCaseInsensitiveEquals(std::string_view lhs,
std::string_view rhs) noexcept;
/// @brief Parses a complete positive base-10 source label.
/// @return The positive label or an input failure for malformed, nonpositive,
/// or out-of-range text.
Result<std::int64_t> ParsePositiveSourceLabel(std::string_view text);
} // namespace fesa
#endif // FESA_CORE_ASCII_H_