📄 nativetypes.html
字号:
methods the native type implements:</B></FONT></P>
<PRE><FONT COLOR="#008000"><SPAN STYLE="background: #ffffff">// constructors, convertor</SPAN></FONT>
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>File<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>File<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>filespec, <SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">const long</FONT><FONT COLOR="#000000">& </FONT></SPAN>mode<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method string </FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#0000ff">convertor</FONT><FONT COLOR="#ff0000">()</FONT></SPAN>;
<FONT COLOR="#008000"><SPAN STYLE="background: #ffffff">// filespec getters / setters</SPAN></FONT>
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method string </FONT><FONT COLOR="#000000"> </FONT></SPAN>Filespec<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method string </FONT><FONT COLOR="#000000"> </FONT></SPAN>Path<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method string </FONT><FONT COLOR="#000000"> </FONT></SPAN>Name<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method string </FONT><FONT COLOR="#000000"> </FONT></SPAN>Type<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>Filespec<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>filespec<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>Path<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>path<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>Name<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>name<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>Type<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>type<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<FONT COLOR="#008000"><SPAN STYLE="background: #ffffff">// file mode getter / setter (0=Read, 1=Write, 2=Append)</SPAN></FONT>
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>Mode<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>Mode<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const long</FONT><FONT COLOR="#000000">& </FONT></SPAN>mode<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<FONT COLOR="#008000"><SPAN STYLE="background: #ffffff">// file stream operations</SPAN></FONT>
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>Open<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>Length<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>Position<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>Position<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const long</FONT><FONT COLOR="#000000">& </FONT></SPAN>pos<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>Eof<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<FONT COLOR="#008000"><SPAN STYLE="background: #ffffff">// text mode in / out</SPAN></FONT>
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>ReadTextLine<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">string</FONT><FONT COLOR="#000000">& </FONT></SPAN>result<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>WriteTextLine<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>text<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>ReadText<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">string</FONT><FONT COLOR="#000000">& </FONT></SPAN>result<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>WriteText<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>text<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<FONT COLOR="#008000"><SPAN STYLE="background: #ffffff">// binary mode in / out</SPAN></FONT>
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>GetLong<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000">& </FONT></SPAN>result<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>PutLong<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const long</FONT><FONT COLOR="#000000">& </FONT></SPAN>value<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>GetFloat<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">float</FONT><FONT COLOR="#000000">& </FONT></SPAN>result<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>PutFloat<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const float</FONT><FONT COLOR="#000000">& </FONT></SPAN>value<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>GetString<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">string</FONT><FONT COLOR="#000000">& </FONT></SPAN>result<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>PutString<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>value<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>Close<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<FONT COLOR="#008000"><SPAN STYLE="background: #ffffff">// other operations</SPAN></FONT>
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>Exists<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>Rename<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>newFilespec<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>Remove<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;</PRE><H1>
<FONT FACE="Arial, sans-serif">Trex methods</FONT></H1>
<P><FONT FACE="Arial, sans-serif">Trex is a simple regular expression
search object.<BR>It is based on the <A HREF="http://sourceforge.net/projects/tiny-rex/">Tiny-Rex</A>
project by <A HREF="http://www.ademichelis.com/">Alberto Demichelis</A>.</FONT></P>
<PRE STYLE="margin-bottom: 0.5cm"><SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">import </FONT></SPAN><SPAN STYLE="background: transparent"><FONT COLOR="#000000">Trex;</FONT></SPAN></PRE><P>
<FONT FACE="Arial, sans-serif"><B>These are the prototypes of the
methods the native type implements:</B></FONT></P>
<PRE><FONT COLOR="#008000"><SPAN STYLE="background: #ffffff">// constructors, convertor</SPAN></FONT>
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>Trex<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>regex<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method string convertor</FONT><FONT COLOR="#ff0000">()</FONT></SPAN>;
<FONT COLOR="#008000"><SPAN STYLE="background: #ffffff">// methods</SPAN></FONT>
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT></SPAN>Match<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>text<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT></SPAN>Search<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>text<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT></SPAN>Search<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>text, <SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">const long</FONT><FONT COLOR="#000000">& </FONT></SPAN>start, <SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">const long</FONT><FONT COLOR="#000000">& </FONT></SPAN>length<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method array </FONT></SPAN>Search<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>text, <SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>format<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method array </FONT></SPAN>Slice<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>text<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method string </FONT></SPAN>Replace<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>text, <SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>replace<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method string </FONT></SPAN>FormatMatch<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const string</FONT><FONT COLOR="#000000">& </FONT></SPAN>format<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method string </FONT></SPAN>GetSubMatch<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">const long</FONT><FONT COLOR="#000000">& </FONT></SPAN>index<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<FONT COLOR="#008000"><SPAN STYLE="background: #ffffff">// read-only accessors</SPAN></FONT>
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">accessor long </FONT></SPAN>subMatchCount<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">accessor long </FONT></SPAN>matchStart<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">accessor long </FONT></SPAN>matchEnd<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">accessor long </FONT></SPAN>matchLength<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">accessor long </FONT></SPAN>valid<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;</PRE>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -