ok, n = ValidateStr(s$[, encoding])
s$
and returns True
if the string contains only valid
characters, False
otherwise. The second return value contains the number of valid characters
in the string. If validation succeeds, this will be the same as the result of StrLen().
Otherwise this will tell you the offset of the first invalid character in the string.
The optional encoding
parameter can be used to set the character encoding
to use. This defaults to the default string encoding set using SetDefaultEncoding().
See Character encodings for details.
This function is only useful in case #ENCODING_UTF8
is used. If the encoding is
set to #ENCODING_ISO8859_1
, this function will always return True
.