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).
20 lines
852 B
C++
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
|