aboutsummaryrefslogtreecommitdiffstats
path: root/doc/latex/utility_8h.tex
blob: d81398b085cc91d1ca639a7bddd3e0ecfea00864 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
\hypertarget{utility_8h}{\section{meowpp/utility.h File Reference}
\label{utility_8h}\index{meowpp/utility.\-h@{meowpp/utility.\-h}}
}
{\ttfamily \#include $<$cstdlib$>$}\\*
{\ttfamily \#include $<$cstring$>$}\\*
{\ttfamily \#include $<$cstdio$>$}\\*
{\ttfamily \#include $<$cstdarg$>$}\\*
{\ttfamily \#include $<$string$>$}\\*
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structmeow_1_1PairToPair}{meow\-::\-Pair\-To\-Pair$<$ F1, F2, T1, T2 $>$}
\begin{DoxyCompactList}\small\item\em 有.\-from.\-first, .from.\-second, .to.\-first, .to.\-second \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
\hyperlink{namespacemeow}{meow}
\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{utility_8h_a7b550f1ff25a89286527a460c390a902}{debug\-Printf}(str)
\begin{DoxyCompactList}\small\item\em 若\-D\-E\-B\-U\-G有被define過, 將字串印到stderr, 並且附上檔名行號與所在函數名 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
std\-::string \hyperlink{namespacemeow_a09946550cc38b132151643d3408b0175}{meow\-::string\-Printf} (char const $\ast$fmt,...)
\begin{DoxyCompactList}\small\item\em 類似\-C的printf, 不過是將格式化的字串丟到 {\ttfamily std\-::string} 裡回傳 \end{DoxyCompactList}\item 
std\-::string \hyperlink{namespacemeow_a532a4a224ccd34baa4c6317a8a014ba4}{meow\-::string\-Replace} (std\-::string str, std\-::string const \&from, std\-::string const \&to)
\begin{DoxyCompactList}\small\item\em 將輸入字串中的某個pattern取代成另一個pattern \end{DoxyCompactList}\item 
bool \hyperlink{namespacemeow_a375bf0494e671d61343f5be28f3204fb}{meow\-::cstring\-End\-With} (char const $\ast$str, \hyperlink{classint}{int} n,...)
\begin{DoxyCompactList}\small\item\em 檢查給定字串的結尾是否符合給定的數個patterns中的一個 \end{DoxyCompactList}\item 
void \hyperlink{namespacemeow_a644a491d867da42696e3cf226019fc25}{meow\-::debug\-Printf\-\_\-} (char const $\ast$file, char const $\ast$func, size\-\_\-t line, char const $\ast$msg)
\item 
void \hyperlink{namespacemeow_a9aad86d9211af4ca27b72f87c2643926}{meow\-::message\-Printf} (\hyperlink{classint}{int} level\-\_\-change, char const $\ast$fmt,...)
\begin{DoxyCompactList}\small\item\em 階層式輸出 \end{DoxyCompactList}\item 
bool \hyperlink{namespacemeow_a575ff1d89bedceb3f850e0c6b7ab2396}{meow\-::filename\-Compare} (std\-::string const \&f1, std\-::string const \&f2)
\begin{DoxyCompactList}\small\item\em 將兩個字串用人類習慣的檔名排序方式排序 \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\hypertarget{utility_8h_a7b550f1ff25a89286527a460c390a902}{\index{utility.\-h@{utility.\-h}!debug\-Printf@{debug\-Printf}}
\index{debug\-Printf@{debug\-Printf}!utility.h@{utility.\-h}}
\subsubsection[{debug\-Printf}]{\setlength{\rightskip}{0pt plus 5cm}\#define debug\-Printf(
\begin{DoxyParamCaption}
\item[{}]{str}
\end{DoxyParamCaption}
)}}\label{utility_8h_a7b550f1ff25a89286527a460c390a902}
{\bfseries Value\-:}
\begin{DoxyCode}
\hyperlink{namespacemeow_a644a491d867da42696e3cf226019fc25}{debugPrintf\_}(\(\backslash\)
             \_\_FILE\_\_,\(\backslash\)
             \_\_FUNCTION\_\_,\(\backslash\)
             \_\_LINE\_\_,\(\backslash\)
             str)
\end{DoxyCode}


若\-D\-E\-B\-U\-G有被define過, 將字串印到stderr, 並且附上檔名行號與所在函數名 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & 要輸出的字串, 必須是c string, 即 {\ttfamily char} {\ttfamily const$\ast$} 型態 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}\end{DoxyReturn}
\begin{DoxyNote}{Note}
這是一個 {\bfseries macro} 
\end{DoxyNote}


Definition at line 103 of file utility.\-h.