Mercurial > hg > Members > kono > nitros9-code
changeset 555:d14042385d24
findstr and signal finished.
author | roug |
---|---|
date | Tue, 22 Oct 2002 19:09:04 +0000 |
parents | afff0087c27f |
children | 28a203bbd2cc |
files | docs/ccguide/findstr.refentry |
diffstat | 1 files changed, 36 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/docs/ccguide/findstr.refentry Tue Oct 22 19:09:04 2002 +0000 +++ b/docs/ccguide/findstr.refentry Tue Oct 22 19:09:04 2002 +0000 @@ -1,14 +1,25 @@ <refentry id="findstr"> <refnamediv> -<refname>findstr</refname> -<refpurpose>Placeholder</refpurpose> +<refname>Findstr</refname> +<refname>Findnstr</refname> +<refpurpose>string search</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef><function>findstr</function></funcdef> - <paramdef>type <parameter>arg1</parameter></paramdef> + <paramdef>int <parameter>pos</parameter></paramdef> + <paramdef>char *<parameter>string</parameter></paramdef> + <paramdef>char *<parameter>pattern</parameter></paramdef> +</funcprototype> + +<funcprototype> + <funcdef><function>findnstr</function></funcdef> + <paramdef>int <parameter>pos</parameter></paramdef> + <paramdef>char *<parameter>string</parameter></paramdef> + <paramdef>char *<parameter>pattern</parameter></paramdef> + <paramdef>int <parameter>size</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -16,7 +27,28 @@ <refsect1><title>Description</title> <para> -Placeholder +These functions search the string pointed to by "string" for +the first instance of the pattern pointed to by "pattern" +starting at position "pos" (where the first position is 1 not +0). The returned value is the position of the first matched +character of the pattern in the string or zero if a match is +not found. +</para> +<para> +Findstr stops searching the string when a null byte is found in +"string". +</para> +<para> +Findnstr only stops searching at position "pos" + "len" so it may +continue past null bytes. +</para> +</refsect1> + +<refsect1><title>Caveats</title> +<para> +The current implementation does not use the most efficient +algorithm for pattern matching so that use on very long strings +is likely to be somewhat slower than it might be. </para> </refsect1>