2022-04-17 10:24:43 -05:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
namespace SohUtils {
|
|
|
|
const std::string& GetSceneName(int32_t scene);
|
|
|
|
|
|
|
|
const std::string& GetItemName(int32_t item);
|
|
|
|
|
|
|
|
const std::string& GetQuestItemName(int32_t item);
|
2023-10-27 15:18:56 -04:00
|
|
|
|
2024-05-07 15:29:17 +02:00
|
|
|
const std::string& GetRandomizerCheckAreaPrefix(int32_t rcarea);
|
|
|
|
|
2023-10-27 15:18:56 -04:00
|
|
|
// Copies a string and ensures the destination is null terminated if the source string is larger than size
|
|
|
|
// Only up to size-1 characters are copied from the source string
|
|
|
|
void CopyStringToCharArray(char* destination, std::string source, size_t size);
|
2023-11-28 22:42:37 -06:00
|
|
|
|
|
|
|
std::string Sanitize(std::string stringValue);
|
2024-02-15 20:23:12 -05:00
|
|
|
|
|
|
|
// Copies a string into a char buffer up to maxBufferSize characters. This does NOT insert a null terminator
|
|
|
|
// on the end, as this is used for in-game messages which are not null-terminated.
|
|
|
|
size_t CopyStringToCharBuffer(char* buffer, const std::string& source, size_t maxBufferSize);
|
2024-10-18 11:07:22 -05:00
|
|
|
|
|
|
|
bool IsStringEmpty(std::string str);
|
2022-04-17 10:24:43 -05:00
|
|
|
} // namespace SohUtils
|