---
name: "wnscan"
section: "3"
platform: "linux"
package: "libwn-dev"
version: "6.0-17"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/wnscan"
---

# wnscan(3)

scan cstream for patterns

## NAME

wn\_scan\_for\_eos, wn\_scan\_for\_char, wn\_scan\_for\_char\_type, wn\_scan\_for\_not\_char\_type, wn\_scan\_for\_literal - scan cstream for patterns

## SYNOPSIS

```
#include <wn/wncstr.h>

bool wn_scan_for_eos(stream)
wn_cstream stream;

bool wn_scan_for_char(stream,c)
wn_cstream stream;
char c;

bool wn_scan_for_char_type(stream,char_type)
wn_cstream stream;
char char_type[256];

bool wn_scan_for_not_char_type(stream,char_type)
wn_cstream stream;
char char_type[256];

bool wn_scan_for_literal(stream,literal)
wn_cstream stream;
char literal[];

```

## DESCRIPTION

These routines scan *stream* for the indicated pattern.  They return **TRUE** and set the current mark to the beginning of the pattern if successful.  Otherwise, they return **FALSE** and leave current mark unaltered.

**wn\_scan\_for\_char\_type** scans for a character c which satisfies *char\_type*\[c\] == **TRUE**.  **wn\_scan\_for\_char\_type** returns **FALSfP if** **such a char cannot be found.**

**wn\_scan\_for\_not\_char\_type scans for a character c which satisfies** *char\_type***\[c\] == FALSE.  End of stream is considered to be a match,** **so wn\_scan\_for\_not\_char\_type always succeeds.**

## BUGS

**More scan routines are needed.**

**Need routines to scan between 2 marks rather than between a mark** **and end of stream.**

**Need routines to scan backward.**

**What about scan for regular expressions?**

## SEE ALSO

**wncstr, wnptok, wnary**

## AUTHOR

**Will Naylor**
