OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [tcl/] [doc/] [lsearch.n] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1993 The Regents of the University of California.
3
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
4
'\"
5
'\" See the file "license.terms" for information on usage and redistribution
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7
'\"
8
'\" RCS: @(#) $Id: lsearch.n,v 1.1.1.1 2002-01-16 10:25:24 markom Exp $
9
'\"
10
.so man.macros
11
.TH lsearch n 7.0 Tcl "Tcl Built-In Commands"
12
.BS
13
'\" Note:  do not modify the .SH NAME line immediately below!
14
.SH NAME
15
lsearch \- See if a list contains a particular element
16
.SH SYNOPSIS
17
\fBlsearch \fR?\fImode\fR? \fIlist pattern\fR
18
.BE
19
 
20
.SH DESCRIPTION
21
.PP
22
This command searches the elements of \fIlist\fR to see if one
23
of them matches \fIpattern\fR.
24
If so, the command returns the index of the first matching
25
element.
26
If not, the command returns \fB\-1\fR.
27
The \fImode\fR argument indicates how the elements of the list are to
28
be matched against \fIpattern\fR and it must have one of the following
29
values:
30
.TP
31
\fB\-exact\fR
32
The list element must contain exactly the same string as \fIpattern\fR.
33
.TP
34
\fB\-glob\fR
35
\fIPattern\fR is a glob-style pattern which is matched against each list
36
element using the same rules as the \fBstring match\fR command.
37
.TP
38
\fB\-regexp\fR
39
\fIPattern\fR is treated as a regular expression and matched against
40
each list element using the same rules as the \fBregexp\fR command.
41
.PP
42
If \fImode\fR is omitted then it defaults to \fB\-glob\fR.
43
 
44
.SH KEYWORDS
45
list, match, pattern, regular expression, search, string

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.