?? usage methods.html
字號:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Usage: Methods</title>
<link href="Main.css" rel="stylesheet" type="text/css">
</head>
<body>
<h2>Methods</h2>
<hr>
<table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td>
<font color="DarkBlue">function FindFirst(<br>
const AText: WideString;<br>
const AStartPos: Int64;<br>
AEncoding: TATEncoding;<br>
AOptions: TATStreamSearchOptions): Boolean;</font>
<br><br>
Starts the search.<br>
Before the search, the FileName or Stream property must be assigned.<br>
Parameters:
<ul>
<li>AText: string to find.<br>
Unicode string must be in the Little-Endian format.</li>
<p>
<li>AStartPos: search start position (0-based).<br>
If it is 0, search will be performed from the beginning or end of the file/stream,
depending of "Backward Search" option presence.</li>
<p>
<li>AEncoding: text encoding. Possible values are:
<ul>
<li><span style="font-weight: bold;">vencANSI</span>: ANSI encoding (locale dependent)</li>
<li><span style="font-weight: bold;">vencOEM</span>: OEM encoding (locale dependent)</li>
<li><span style="font-weight: bold;">vencEBCDIC</span>: IBM EBCDIC US encoding</li>
<li><span style="font-weight: bold;">vencKOI8</span>: KOI8-R encoding</li>
<li><span style="font-weight: bold;">vencISO</span>: ISO encoding (locale dependent)</li>
<li><span style="font-weight: bold;">vencMac</span>: Macintosh encoding (locale dependent)</li>
<li>plus many others, see the complete list in ATxCodepages.pas
</ul>
</li>
<p>
<li>AOptions: search options that are set of flags:
<ul>
<li><span style="font-weight: bold;">asoCaseSens</span>: Case Sensitive search</li>
<li><span style="font-weight: bold;">asoWholeWords</span>: Whole Words search</li>
<li><span style="font-weight: bold;">asoBackward</span>: Backward search (Note: ignored in RegEx mode)</li>
<li><span style="font-weight: bold;">asoRegEx</span>: RegEx search</li>
</ul>
</li>
</ul>
Result is True if search was successfull.<br>
In this case you can read the
FoundStart and FoundLength properties to get the resulting position and length.<br>
Notes:<br>
<ul>
<li>RegEx notes:
<ul>
<li>On invalid regex this method raises an exception with descriptive message.</li>
<li>It is not recommended to use "Case Sensitive" and "Whole Words" options with
quite complex regex that already specifies these options.
For example, you shouldn't use the "Case Sensitive" option with regex containing (?i),
and shouldn't use the "Whole Words" option with regex containing /b or /pZ.
Otherwise the search result can be incorrect.
</ul>
</li>
<li>Encodings notes:
<ul>
<li>ANSI, OEM, EBCDIC, KOI8, ISO, Mac encodings are always available.
<li>EBCDIC, KOI8, ISO, Mac encodings are used via MultiByteToWideChar API, if possible.
But if they are not installed on OS (for example, on Win9x),
then the hardcoded codepages are used.
<li>All other encodings are used via MultiByteToWideChar API,
they are available only when installed on OS.
</ul>
</li>
</ul>
</td>
</tr>
<tr>
<td>
<font color="DarkBlue">function FindNext(AFindPrevious: Boolean = False): Boolean;</font><br><br>
Continues the search.<br>
AFindPrevious: continue search in reverse direction (Note: not supported for RegEx search).<br>
Result is the same as for FindFirst method.
</td>
</tr>
</tbody>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -