Determines whether or not any characters in a first character string do not exist in a second character string.
JSV_allowInString(expS1, expS2)
expS1.allowInString(expS2)
The allowInString function returns true if all the characters in the string expS1 exist in the string expS2; otherwise, false.
The allowInString function uses the following arguments.
Argument | Description |
expS1 | The character expression that is searched. |
expS2 | The string that contains the characters that are only allowed to exist in expS1. |
n/a
JSV_isEmpty, JSV_stripCharacters
The following lines of code
var allowedCharacters = "ABCDEF", testString = "AFCD";
document.write( testString +
" only contains characters in " +
allowedCharacters +
"? " +
JSV_allowInString(testString, allowedCharacters) );
testString = "AFCD1234";
document.write( testString +
" only contains characters in " +
allowedCharacters +
"? " +
JSV_allowInString(testString, allowedCharacters) );
produce
Copyright © 1998-2000 Roaring Fork Software. All rights reserved.