Function Reference


StringIsAlpha

Checks if a string contains only alphabetic characters.

StringIsAlpha ( "string" )

Parameters

string The string to check

Return Value

Success: 1.
Failure: 0 if string contains non-alphabetic characters.

Remarks

Keep in mind that any whitespace will cause StringIsAlpha() to return 0.

Related

StringIsAlNum, StringIsASCII, StringIsDigit, StringIsLower, StringIsSpace, StringIsUpper, StringIsXDigit, StringLower, StringUpper

Example

#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