annotate docs/ccguide/findstr.refentry @ 3102:13299b970532

l1/sys/makefiles: Remove unused alldragon target Also move helpmsg target to make it more similar to the l2 one.
author Tormod Volden <debian.tormod@gmail.com>
date Sun, 28 Feb 2016 21:37:50 +0100
parents d14042385d24
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
1 <refentry id="findstr">
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
2 <refnamediv>
555
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
3 <refname>Findstr</refname>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
4 <refname>Findnstr</refname>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
5 <refpurpose>string search</refpurpose>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
6 </refnamediv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
7
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
8 <refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
9 <funcsynopsis>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
10 <funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
11 <funcdef><function>findstr</function></funcdef>
555
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
12 <paramdef>int <parameter>pos</parameter></paramdef>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
13 <paramdef>char *<parameter>string</parameter></paramdef>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
14 <paramdef>char *<parameter>pattern</parameter></paramdef>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
15 </funcprototype>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
16
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
17 <funcprototype>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
18 <funcdef><function>findnstr</function></funcdef>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
19 <paramdef>int <parameter>pos</parameter></paramdef>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
20 <paramdef>char *<parameter>string</parameter></paramdef>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
21 <paramdef>char *<parameter>pattern</parameter></paramdef>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
22 <paramdef>int <parameter>size</parameter></paramdef>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
23 </funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
24 </funcsynopsis>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
25
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
26 </refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
27
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
28 <refsect1><title>Description</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
29 <para>
555
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
30 These functions search the string pointed to by "string" for
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
31 the first instance of the pattern pointed to by "pattern"
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
32 starting at position "pos" (where the first position is 1 not
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
33 0). The returned value is the position of the first matched
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
34 character of the pattern in the string or zero if a match is
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
35 not found.
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
36 </para>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
37 <para>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
38 Findstr stops searching the string when a null byte is found in
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
39 "string".
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
40 </para>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
41 <para>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
42 Findnstr only stops searching at position "pos" + "len" so it may
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
43 continue past null bytes.
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
44 </para>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
45 </refsect1>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
46
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
47 <refsect1><title>Caveats</title>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
48 <para>
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
49 The current implementation does not use the most efficient
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
50 algorithm for pattern matching so that use on very long strings
d14042385d24 findstr and signal finished.
roug
parents: 542
diff changeset
51 is likely to be somewhat slower than it might be.
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
52 </para>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
53 </refsect1>
542
73319ee6a57e All "See Also" implemented
roug
parents: 466
diff changeset
54
73319ee6a57e All "See Also" implemented
roug
parents: 466
diff changeset
55 <refsect1><title>See Also</title>
73319ee6a57e All "See Also" implemented
roug
parents: 466
diff changeset
56 <para>
73319ee6a57e All "See Also" implemented
roug
parents: 466
diff changeset
57 <link linkend="strcat">index(), rindex()</link>
73319ee6a57e All "See Also" implemented
roug
parents: 466
diff changeset
58 </para>
73319ee6a57e All "See Also" implemented
roug
parents: 466
diff changeset
59 </refsect1>
73319ee6a57e All "See Also" implemented
roug
parents: 466
diff changeset
60
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
61 </refentry>