StrMatch.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
- '"
- '" Copyright (c) 1989-1993 The Regents of the University of California.
- '" Copyright (c) 1994-1996 Sun Microsystems, Inc.
- '"
- '" See the file "license.terms" for information on usage and redistribution
- '" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- '"
- '" RCS: @(#) $Id: StrMatch.3,v 1.4 2000/05/08 22:05:00 hobbs Exp $
- '"
- .so man.macros
- .TH Tcl_StringMatch 3 8.1 Tcl "Tcl Library Procedures"
- .BS
- .SH NAME
- Tcl_StringMatch, Tcl_StringCaseMatch - test whether a string matches a pattern
- .SH SYNOPSIS
- .nf
- fB#include <tcl.h>fR
- .sp
- int
- fBTcl_StringMatchfR(fIstringfR, fIpatternfR)
- .sp
- int
- fBTcl_StringCaseMatchfR(fIstringfR, fIpatternfR, fInocasefR)
- .SH ARGUMENTS
- .AP char *string in
- String to test.
- .AP char *pattern in
- Pattern to match against string. May contain special
- characters from the set *?e[].
- .AP int nocase in
- Specifies whether the match should be done case-sensitive (0) or
- case-insensitive (1).
- .BE
- .SH DESCRIPTION
- .PP
- This utility procedure determines whether a string matches
- a given pattern. If it does, then fBTcl_StringMatchfR returns
- 1. Otherwise fBTcl_StringMatchfR returns 0. The algorithm
- used for matching is the same algorithm used in the ``string match''
- Tcl command and is similar to the algorithm used by the C-shell
- for file name matching; see the Tcl manual entry for details.
- .VS 8.1
- .PP
- In fBTcl_StringCaseMatchfR, the algorithm is the same, but you have
- the option to make the matching case-insensitive. If you choose this
- (by passing fBnocasefR as 1), then the string and pattern are
- essentially matched in the lower case.
- .VE 8.1
- .SH KEYWORDS
- match, pattern, string