<!-- $XConsortium: TxtFindA.sgm /main/10 1996/09/25 14:51:36 cdedoc $ -->
<!-- (c) Copyright 1995 Digital Equipment Corporation. -->
<!-- (c) Copyright 1995 Hewlett-Packard Company. -->
<!-- (c) Copyright 1995 International Business Machines Corp. -->
<!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
<!-- (c) Copyright 1995 Novell, Inc. -->
<!-- (c) Copyright 1995 FUJITSU LIMITED. -->
<!-- (c) Copyright 1995 Hitachi. -->

<RefEntry Id="CDEMMA.MAN509.rsml.1">
<RefMeta>
<RefEntryTitle>XmTextFindString</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>XmTextFindString</Function></RefName>
<RefPurpose>A Text function that finds the beginning position of a text string
<IndexTerm>
<Primary>XmTextFindString</Primary>
</IndexTerm><IndexTerm>
<Primary>Text functions</Primary>
<Secondary>XmTextFindString</Secondary>
</IndexTerm></RefPurpose>
</RefNameDiv>
<!-- -->
<!-- @OSF_COPYRIGHT@-->
<!-- COPYRIGHT NOTICE-->
<!-- Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.-->
<!-- ALL RIGHTS RESERVED (MOTIF). See the file named COPY.MOTIF.DOC for-->
<!-- the full copyright text.-->
<!-- -->
<!-- HISTORY-->
<!-- -->
<!-- **-->
<!-- **-->
<!-- **  (c) Copyright 1989, 1990, 1992 by Open Software Foundation, Inc.-->
<!-- **      All Rights Reserved.-->
<!-- **-->
<!-- **  (c) Copyright 1987, 1988, 1989, by Hewlett-Packard Company-->
<!-- **-->
<!-- **  (c) Copyright 1987, 1988 by Digital Equipment Corporation,-->
<!-- **      Maynard, MA.  All Rights Reserved.-->
<!-- **-->
<!-- **-->
<RefSynopsisDiv>
<FuncSynopsis>
<FuncSynopsisInfo>#include &lt;Xm/Xm.h>
</FuncSynopsisInfo>
<FuncDef>Boolean <Function>XmTextFindString</Function></FuncDef>
<!--<ParamDef><Replaceable>widget, start, string, direction, position</Replaceable></ParamDef>-->
<ParamDef>Widget <Parameter>widget</Parameter></ParamDef>
<ParamDef>XmTextPosition <Parameter>start</Parameter></ParamDef>
<ParamDef>char *<Parameter>string</Parameter></ParamDef>
<ParamDef>XmTextDirection <Parameter>direction</Parameter></ParamDef>
<ParamDef>XmTextPosition *<Parameter>position</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para><Function>XmTextFindString</Function> locates the beginning position of a specified
text string. This routine searches forward or backward for the first
occurrence of the string starting from the given start position.
<!--&bsol;" apparently the code doesn't do this
If a match is not found, the search wraps to the beginning of the buffer
(to the end, when &bsol;*Vdirection&bsol;*O is &bsol;*LXmTEXT_BACKWARD&bsol;*O) and continues
to the initial start position.
-->If it finds a match, the function
returns the position of the first character of the string in <Symbol Role="Variable">position</Symbol>.
If the match string begins at the current position, this routine returns the current position.
</Para>
<VariableList>
<VarListEntry>
<Term><Symbol Role="Variable">widget</Symbol></Term>
<ListItem>
<Para>Specifies the Text widget ID.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">start</Symbol></Term>
<ListItem>
<Para>Specifies the character position from which the search proceeds. This
is an integer number of characters from the beginning of the text
buffer. The first character position is 0 (zero).
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">string</Symbol></Term>
<ListItem>
<Para>Specifies the search string.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Emphasis>direction</Emphasis></Term>
<ListItem>
<Para>Indicates the search direction. It is relative to the primary
direction of the text. The possible values are
</Para>
<VariableList>
<VarListEntry>
<Term><SystemItem Class="Constant">XmTEXT_FORWARD</SystemItem></Term>
<ListItem>
<Para>The search proceeds toward the end of the text buffer.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmTEXT_BACKWARD</SystemItem></Term>
<ListItem>
<Para>The search proceeds toward the beginning of the text buffer.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">position</Symbol></Term>
<ListItem>
<Para>Specifies the pointer in which the first character position
of the string match is returned. This is an integer number
of characters from the beginning of the buffer. The first
character position is 0 (zero). If the function returns False,
this value is undefined.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
<Para>For a complete definition of Text and its associated resources,
see &cdeman.XmText;.
</Para>
</RefSect1>
<RefSect1>
<Title>RETURN</Title>
<Para>Returns True if a string match is found; otherwise, returns False.
</Para>
</RefSect1>
<RefSect1>
<Title>RELATED</Title>
<Para>&cdeman.XmText; and &cdeman.XmTextFindStringWcs;.
</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.09 7/2/95-->
