Batch #3559 by eAthena: 0 byte-identical, 5 confirmed by peer review. - fn_02757 CountCharacters: logic confirmed by peer review - fn_02758 ContainsText: logic confirmed by peer review - fn_02761 IsNullOrEmpty: logic confirmed by peer review - fn_02762 RemoveAll: logic confirmed by peer review - fn_02763 ReplaceAll: logic confirmed by peer review Peer-reviewed-by: superintelligence Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). Adds to the build: Source/Utility/Text/StringUtil.cpp
14 lines
502 B
C++
14 lines
502 B
C++
#ifndef RAGNAROK_SOURCE_UTILITY_TEXT_STRINGUTIL_H
|
|
#define RAGNAROK_SOURCE_UTILITY_TEXT_STRINGUTIL_H
|
|
|
|
#include <string>
|
|
#include <string_view>
|
|
#include <windows.h>
|
|
|
|
int CountCharacters(WORD codePage, const char* text, const char* end);
|
|
bool ContainsText(const std::string& text, std::string_view pattern);
|
|
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);
|
|
|
|
#endif
|