Sophie

Sophie

distrib > Mageia > 4 > i586 > media > core-release > by-pkgid > 07a81589bb2c4aa5e88f35a4a345a184 > files > 198

maradns-1.4.13-2.mga4.i586.rpm

.\" Process this file with
.\" groff -man -Tascii cryptday.1
.\"
.TH js_nonmatch 3 "October 2000" JS "js library reference"
.\" We don't want hyphenation (it's too ugly)
.\" We also disable justification when using nroff
.hy 0
.if n .na
.SH NAME
js_nonmatch \- search for anything besides a literal character in exp in 
the string js
.SH SYNOPSIS
.nf
.B #include "JsStr.h"
.sp
.B "int js_nonmatch(js_string *exp, js_string *js)"
.fi
.SH DESCRIPTION
.B js_nonmatch
searches for any single character that is not in the expressio
.B exp
in the string
.B js.

The expression 
.B exp
is treated as a list of characters we do not look for in the string
.B js.
No characters are considered metacharacters in the expression
.B exp.
.SH "RETURN VALUE"
.B js_match
returns -2 if all of the characters in the string
.B js
were found in the string
.B exp,
the offset of the first found character if the a character not in exp
was found (0 if it
was found at the top of the string, 1 if it was found starting at the
second character in the string, etc), and
.I JS_ERROR
if there was an error when searching for a character in the expression.
.SH EXAMPLE
The following example will find the character 1 in the string "543" 
in the string "1234567890":

.nf
	js_string *foo, *bar;
	foo = js_create(256,1);
	bar = js_create(256,1);
	js_str2js(foo,"1234567890",10,1);
	js_str2js(bar,"543",3,1);
	printf("%d\\n",js_match(bar,foo)); /* You will see 2 */
.fi
.SH AUTHOR
Sam Trenholme <kiwi-zttfryb@koala.samiam.org>