Sese Framework
x.y.z
A cross-platform framework
|
工具杂项函数 更多...
#include "sese/Config.h"
#include "sese/io/InputStream.h"
#include "sese/io/OutputStream.h"
#include <chrono>
#include <thread>
类 | |
struct | sese::StrCmp |
字符比较器 更多... | |
struct | sese::StrCmpI |
字符比较器(忽略大小写) 更多... | |
命名空间 | |
namespace | sese |
宏定义 | |
#define | CheckRange(x, max) ((unsigned int) (x) < (max)) |
更快速的边界检查 - [0, max) | |
#define | CheckRangeBetween(x, min, max) (((x) - (min)) | ((max) - (x)) >= 0) |
更快速的边界检查 - [min, max] | |
函数 | |
int64_t | sese::toInteger (const std::string &string, int radix=10) |
std::string | sese::getClassName (const std::type_info *type) |
bool | sese::strcmp (char const *lv, char const *rv) noexcept |
bool | sese::strcmpDoNotCase (char const *lv, char const *rv) noexcept |
bool | sese::isSpace (char ch) noexcept |
const char * | sese::getLevelString (Level level) noexcept |
int32_t | sese::findFirstAt (const char *str, char ch) |
void | sese::sleep (uint32_t second) |
template<class REP , class PERIOD > | |
void | sese::sleep (const std::chrono::duration< REP, PERIOD > &duration) |
std::string | sese::getErrorString (int64_t error=errno) |
int32_t | sese::getErrorCode () |
size_t | sese::streamMove (sese::io::OutputStream *out, sese::io::InputStream *in, size_t size) noexcept |
template<class T > | |
size_t | sese::number2StringLength (T num, size_t radix=10) |
template<class T > | |
size_t | sese::floating2StringLength (T num, uint16_t placeholder) |
template<typename TP > | |
std::time_t | sese::to_time_t (TP tp) |
template<typename T > | |
bool | sese::isAdditionOverflow (T a, T b) |
加法溢出检测 | |
template<typename T > | |
bool | sese::isSubtractionOverflow (T a, T b) |
减法溢出检测 | |
const char * | getSpecificVersion () |
工具杂项函数
#define CheckRange | ( | x, | |
max ) ((unsigned int) (x) < (max)) |
更快速的边界检查 - [0, max)
被这些函数引用 sese::text::AbstractStringBuffer::delCharAt(), sese::text::AbstractStringBuffer::getCharAt() , 以及 sese::text::AbstractStringBuffer::setChatAt().
#define CheckRangeBetween | ( | x, | |
min, | |||
max ) (((x) - (min)) | ((max) - (x)) >= 0) |
更快速的边界检查 - [min, max]
const char * getSpecificVersion | ( | ) |
获取详细的信息(C 接口)