StringIsAlpha

首页  后退  前进

StringIsAlpha
down2

StringIsAlpha

检查字符串是否仅包含字母字符.

 

StringIsAlpha ( "string" )

参数

string

目标字符串

返回值

成功:

返回 1.

失败:

返回 0, 字符串含有非字母字符.

备注

任何空白符都将导致本函数返回 0.

 

函数示例

#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

----------------------------------------

 

该函数可以通过命令 exect 调用

参见:

StringIsAlNum, StringIsASCII, StringIsLower, StringIsUpper, StringIsXDigit

例子
copy
StringIsAlpha('Эта~~фраза~~содержит~~空格ы~~и~~точку.')

 

exect=StringIsAlpha('Эта~~фраза~~содержит~~空格ы~~и~~точку.') GLOBALEXECT<a> ;; 检查字符串中只有字母的存在

up2

tcimage © Аверин Андрей для Total Commander Image Averin-And@yandex.ru