OSDN Git Service

42d9d2d6a1d4b06f646a1970f8d74731a4c3d4fc
[eos/optional.git] / doc / Objects / String.html
1 <HTML>
2 <HEAD>
3 <TITLE> String </TITLE>
4 </HEAD>
5 <BODY BGCOLOR="ffffcc">
6 <H1> String </H1>
7 <H4> Update Time 02/03/13---05:41:16 </H4>
8 <H2> Member function </H2>
9 <UL>
10         <LI> stringGetFromFile
11         <LI> stringGetNthWord
12         <LI> stringGetNthRealData
13         <LI> stringGetNthIntegerData
14         <LI> stringIsSame
15         <LI> stringLength
16         <LI> stringCopy
17 </UL>
18 <HR>
19 <A NAME="Information">
20 <H2>Information from source codes</H2>
21 </A>
22 <PRE>
23 ../src/stringGet.c:
24
25 ../src/stringGetFromFile.c:
26
27 ../src/stringIsSame.c:
28
29 ../src/stringUtil.c:
30 </PRE>
31 <HR>
32 <A NAME="include">
33 <H2>String.h</H2>
34 </A>
35 <PRE>
36 #ifndef STRING_H
37 #define STRING_H
38 #include <stdio.h>
39
40 /* constant begin */
41 #define STRING_MAX_LENGTH (8192)
42 #define STRING_WORD_SEPARATOR  " ,\t" 
43 #define STRING_COMMENT_LINE_ID '#' 
44 /* constant end */
45
46 /* struct begin */
47 typedef char*         String;
48 typedef unsigned long stringParaTypeInteger;
49 typedef float         stringParaTypeReal;
50 /* struct end */
51
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55
56 /* prototype begin */
57 extern void stringInit(String s, char* message);
58
59 /*
60         mode&0x01 := 0: quary   1: no quary
61         mode&0x02 := 0: message 1: no message
62 */
63 extern String stringGetFromFile(char* s, char* message, FILE* fptIn, FILE* fptOut, long mode);
64 extern String stringGetFromFileWithSkippingComment(char* s, char* message, FILE* fptIn, FILE* fptOut, long mode);
65 extern char* __getStringData(char* s, char* message, FILE* fptIn, FILE* fptOut, long mode);
66
67 extern String stringGetNthWord(char* s, long nth, char* exception);
68 extern double stringGetNthRealData(char* s, long nth, char* exception);
69 extern long   stringGetNthIntegerData(char* s, long nth, char* exception);
70
71 extern String stringGetWordFromField(char* s, long init, long end);
72 extern double stringGetRealDataFromField(char* s, long init, long end);
73 extern long   stringGetIntegerDataFromField(char* s, long init, long end);
74
75 extern long stringIsSame(String s1, String s2, long n);
76
77 extern long stringLength(String s);
78 extern long stringCopy(String dst, String src, long n);
79 extern String stringDuplicate(String src);
80
81 /* prototype end */
82
83 #ifdef __cplusplus
84 };
85 #endif
86
87 #endif /* STRING_H */
88 </PRE>
89 </BODY>
90 </HTML>