MatchEditor(3I) | InterViews Reference Manual | MatchEditor(3I) |
MatchEditor - StringEditor with pattern matching
#include <InterViews/matcheditor.h>
MatchEditor is a StringEditor subclass that checks the validity of its contents against a specified pattern. It is suitable for entering strings that must conform to a particular format such as a number or a file name. The matching pattern is specified according to the rules of scanf(3). For example, a pattern of "%3d" will match a 3-digit integer, a pattern of "%[ab]" will match a string containing only a's and b's, and a pattern of "(%f, %f)" will match the string "(12.0, 5E23)".
MatchEditor uses sscanf internally to check the pattern match. Different versions of sscanf have different scanning capabilities; check with your local version to see what patterns you can use.
7 Dec 1989 | InterViews |