Checks if a string contains only ASCII characters in the range 0x00 - 0x7f (0 - 127).
StringIsASCII ( "string" )
string | The string to check |
Success: | 1. |
Failure: | 0 if string contains extended ASCII characters. |
StringIsAlNum, StringIsAlpha, StringIsDigit, StringIsLower, StringIsSpace, StringIsUpper, StringIsXDigit, StringLower, StringUpper
#include <MsgBoxConstants.au3>
Local $sString = "This is a sentence with whitespace." ; Check whether this string contains only ASCII characters.
If StringIsASCII($sString) Then
MsgBox($MB_SYSTEMMODAL, "", "The variable contains ASCII characters.")
Else
MsgBox($MB_SYSTEMMODAL, "", "The variable does not contain ASCII characters.")
EndIf