mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
20 lines
No EOL
696 B
C++
20 lines
No EOL
696 B
C++
#ifndef UTIL_STRINGUTIL_H_
|
|
#define UTIL_STRINGUTIL_H_
|
|
|
|
#include <string>
|
|
#include "../typedefs.h"
|
|
|
|
namespace util {
|
|
extern std::wstring lfill(std::wstring s, uint length, wchar_t c);
|
|
extern std::wstring rfill(std::wstring s, uint length, wchar_t c);
|
|
|
|
extern uint encode_utf8(uint32_t c, ubyte* bytes);
|
|
extern uint32_t decode_utf8(uint& size, const char* bytes);
|
|
extern std::string wstr2str_utf8(const std::wstring ws);
|
|
extern std::wstring str2wstr_utf8(const std::string s);
|
|
extern bool is_integer(std::string text);
|
|
extern bool is_integer(std::wstring text);
|
|
extern bool is_valid_filename(std::wstring name);
|
|
}
|
|
|
|
#endif // UTIL_STRINGUTIL_H_
|