#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <cstdarg>
#include <string>
Go to the source code of this file.
|
std::string | meow::stringPrintf (char const *fmt,...) |
| 類似C的printf, 不過是將格式化的字串丟到 std::string 裡回傳 More...
|
|
std::string | meow::stringReplace (std::string str, std::string const &from, std::string const &to) |
| 將輸入字串中的某個pattern取代成另一個pattern More...
|
|
bool | meow::cstringEndWith (char const *str, int n,...) |
| 檢查給定字串的結尾是否符合給定的數個patterns中的一個 More...
|
|
void | meow::debugPrintf_ (char const *file, char const *func, size_t line, char const *msg) |
|
void | meow::messagePrintf (int level_change, char const *fmt,...) |
| 階層式輸出 More...
|
|
bool | meow::filenameCompare (std::string const &f1, std::string const &f2) |
| 將兩個字串用人類習慣的檔名排序方式排序 More...
|
|
#define debugPrintf |
( |
|
str | ) |
|
Value:
__FILE__,\
__FUNCTION__,\
__LINE__,\
str)
void debugPrintf_(char const *file, char const *func, size_t line, char const *msg)
若DEBUG有被define過, 將字串印到stderr, 並且附上檔名行號與所在函數名
- Parameters
-
[in] | str | 要輸出的字串, 必須是c string, 即 char const* 型態 |
- Returns
- 無
- Note
- 這是一個 macro
Definition at line 104 of file utility.h.