rodecomp/Source/Utility/Text/StringUtil.h
ragnarok-clanker d246e974d0 Decompile 5 functions in Source/Utility/Text/StringUtil.cpp, Source/Utility/Text/StringUtil.h
Batch #3633 by Yommy: 0 byte-identical, 5 confirmed by peer review.

- fn_02759 GetFileName: logic confirmed by peer review
- fn_02764 FormatDecimal: logic confirmed by peer review
- fn_02765 Split: logic confirmed by peer review
- fn_02766 TrimRight: logic confirmed by peer review
- fn_02767 TrimLeft: logic confirmed by peer review

Peer-reviewed-by: eAthena, meitogi, superintelligence
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-29 22:58:07 +00:00

20 lines
852 B
C++

#ifndef RAGNAROK_SOURCE_UTILITY_TEXT_STRINGUTIL_H
#define RAGNAROK_SOURCE_UTILITY_TEXT_STRINGUTIL_H
#include <string>
#include <string_view>
#include <vector>
#include <windows.h>
int CountCharacters(WORD codePage, const char* text, const char* end);
bool ContainsText(const std::string& text, std::string_view pattern);
std::string GetFileName(const std::string& path);
bool IsNullOrEmpty(const char* text);
int RemoveAll(std::string& text, std::string_view pattern);
int ReplaceAll(std::string& text, std::string_view pattern, std::string_view replacement);
std::string FormatDecimal(double value, int precision, bool trimZeros);
std::vector<std::string> Split(std::string_view text, std::string_view delimiter);
void TrimRight(std::string& text, std::string_view characters);
void TrimLeft(std::string& text, std::string_view characters);
#endif