Checks if a string contains only alphabetic characters.
StringIsAlpha ( "string" )
As in other StringIs...() the check is stop if a Chr(0) is encountered inside the string.
Internally the C function is used to speed up the processing.
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