mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-17 17:32:45 +01:00
Codechange: Pass span to StrValid instead of first and last - 1. (#12846)
`std::span` is used instead of `std::string_view` as this is only used for fixed-length buffers. This removes some callers of `lastof()`
This commit is contained in:
@@ -27,7 +27,7 @@ void StrMakeValidInPlace(char *str, StringValidationSettings settings = SVS_REPL
|
||||
|
||||
bool strtolower(std::string &str, std::string::size_type offs = 0);
|
||||
|
||||
[[nodiscard]] bool StrValid(const char *str, const char *last) NOACCESS(2);
|
||||
[[nodiscard]] bool StrValid(std::span<const char> str);
|
||||
void StrTrimInPlace(std::string &str);
|
||||
std::string_view StrTrimView(std::string_view str);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user