Skip to content

Modern String VerifySet

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › String Library › String Library › VerifySet

VerifySet

Returns the position of the first character not in a set, or 0 if all are.

Syntax

VerifySet( start, s, chars [, ic] )

Notes

  • O(n*k) — long

Examples

#import "std/strings"
using strings

const digits = "0123456789"

print VerifySet( 1, "12345", digits )    '' 0 -- every character is in the set
print VerifySet( 1, "123x5", digits )    '' 4 -- the first one that is not

'' The classic "is this made only of these characters" test
if VerifySet( 1, "9042", digits ) = 0 then print "all digits"

Library: String Library
Category: String Library
Documented under: The Functions

Clone this wiki locally