Checks if a string contains only alphabetic characters.
StringIsAlpha ( "string" )
string | The string to check |
Success: | 1. |
Failure: | 0 if string contains non-alphabetic characters. |
Keep in mind that any whitespace will cause StringIsAlpha() to return 0.
StringIsAlNum, StringIsASCII, StringIsDigit, StringIsLower, StringIsSpace, StringIsUpper, StringIsXDigit, StringLower, StringUpper
#include <MsgBoxConstants.au3>
Local $sString = "This is a sentence with whitespace." ; Check whether this string contains only alphabetic characters.
If StringIsAlpha($sString) Then
MsgBox($MB_SYSTEMMODAL, "", "The variable contains only alphabetic characters.")
Else
MsgBox($MB_SYSTEMMODAL, "", "The variable does not contain alphabetic characters.")
EndIf