StringIsSpace
检查字符串是否仅包含空白字符.
StringIsSpace ( "string" )
参数
返回值
成功:
|
返回 1.
|
失败:
|
返回 0, 字符串包含非空白符.
|
备注
空白符是指从 Chr(9) 到 Chr(13) 的所有字符, 包括水平制表符、换行符、垂直制表符、换页符以及回车符.
空白还包括空字符串 ( Chr(0) ) 和标准空格 ( Chr(32) ).
函数示例
#include <MsgBoxConstants.au3>
Local $sString = " " & @CRLF & @CRLF & Chr(11) & @TAB & " " & @CRLF ; Check whether this string contains only whitespace characters.
If StringIsSpace($sString) Then
MsgBox($MB_SYSTEMMODAL, "", "The variable contains only whitespace characters.")
Else
MsgBox($MB_SYSTEMMODAL, "", "The variable does not contain whitespace characters.")
EndIf
----------------------------------------
该函数可以通过命令 exect 调用
参见:
StringStripWS, StringIsASCII, StringStripCR
© Аверин Андрей для Total Commander Image Averin-And@yandex.ru
|