3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/debug/log/LogArea.h"
7#include "mc/deps/core/utility/NumberConversionResult.h"
8#include "mc/deps/core/utility/buffer_span.h"
9#include "mc/util/BidirectionalUnorderedMap.h"
15namespace Json {
class Value; }
21MCNAPI ::std::string base64_decode(::std::string
const& encoded_string);
23MCNAPI ::std::string base64_encode(uchar
const* bytes_to_encode, uint64 in_len,
bool pad);
25MCNAPI ::std::string base64url_decode(::std::string encoded);
27MCNAPI ::std::string base64url_encode(::std::string str);
29MCNAPI ::std::string ensureNamespace(::std::string
const&
id, ::std::string_view defaultNamespace);
31MCNAPI
bool equalIgnoreCase(::std::string_view lhs, ::std::string_view rhs);
33MCNAPI ::std::string formatTickDuration(
int ticks);
35MCNAPI ::std::string fromHex(::std::string_view input);
37MCNAPI ::BidirectionalUnorderedMap<int, uint64> generateHashMapFromListTag(
::ListTag const& enumValues);
39MCNAPI ::std::string generateRandomId(
int modifier);
41MCNAPI uint hashCodeAsUtf16(::std::string_view sv);
43MCNAPI
bool isValidNamespaceFormat(::std::string_view name);
45MCNAPI
bool isValidUTF8(::std::string_view content);
47MCNAPI
bool isVanillaNamespace(::std::string
const& identifier);
51MCNAPI
void normalizeLineEndings(::std::string& str);
53MCNAPI ::std::string removeChars(::std::string str, ::std::string
const& characters);
55MCNAPI ::std::string removeIllegalChars(::std::string str);
57MCNAPI ::std::string removeTrailingSpaces(::std::string
const& str);
59MCNAPI ::std::istream& safeGetline(::std::istream& inputStream, ::std::string& outString);
61MCNAPI ::std::vector<::std::string> split(::std::string_view view,
char delim);
63MCNAPI ::std::vector<::std::string> splitAndDiscardEmpty(::std::string
const& str,
char delim);
65MCNAPI ::std::vector<::std::string> splitLines(
66 ::std::string
const& str,
67 ::std::vector<::std::string>
const& delims,
68 bool includeDelimCharsInResult,
69 bool includeEmptyLines,
70 ::std::istream& (*fnGetline)(::std::istream&, ::std::string&)
73MCNAPI ::std::vector<::std::string>& splitString(::std::string_view s,
char delim, ::std::vector<::std::string>& elems);
75MCNAPI ::std::vector<::std::string_view>&
76splitStringAsViews(::std::string_view s,
char delim, ::std::vector<::std::string_view>& elems);
78MCNAPI ::std::vector<::std::string_view> splitToViews(::std::string_view view,
char delim);
81stringReplace(::std::string str,
::buffer_span<::std::pair<::std::string_view, ::std::string_view>> replacements);
83MCNAPI ::std::string& stringReplace(::std::string& s, ::std::string
const& src, ::std::string
const& dst,
int maxCount);
86stringReplaceCopy(::std::string
const& s, ::std::string
const& src, ::std::string
const& dst,
int maxCount);
88MCNAPI ::std::string stringTrim(::std::string
const& s);
90MCNAPI ::std::string stringTrim(::std::string
const& s, ::std::string
const& chars);
92MCNAPI
bool toBool(::std::string
const& input,
bool& destination);
94MCNAPI ::std::string toCamelCase(::std::string
const& src,
char delimiter);
96MCNAPI ::Util::NumberConversionResult toIntWithMinMax(::std::string_view inputStr,
int& destination,
int min,
int max);
98MCNAPI ::std::string toLower(::std::string_view inString);
100MCNAPI ::std::string toStringWithPaddedZeroes(uint number, uchar digitCount);
102MCNAPI ::std::string toUpper(::std::string_view inString);
104MCNAPI
int utf8len(::std::string_view str);
106MCNAPI ::std::string utf8substring(::std::string
const& str,
int startIndex,
int endIndex);
108MCNAPI
bool validateIdentifier(
109 ::std::string
const&
id,
111 bool allowMinecraftNamespace,
112 ::std::pair<::std::string, ::std::string>* idNameOut
115MCNAPI
bool validateIdentifierChunk(::std::string
const& chunk, ::LogArea logArea);
120MCNAPI ::std::string
const& EMPTY_GUID();
122MCNAPI ::std::string
const& EMPTY_STRING();
124MCNAPI ::std::string
const& HEX_CHARS();
126MCNAPI ::std::string
const& NEW_LINE();
Definition SemVersion.h:16
Definition buffer_span.h:6