pub fn ends_with(args: &[Value]) -> Result<Value, RuntimeError>Expand description
检查是否以指定后缀结尾
§功能
检查字符串是否以指定的后缀结尾。
§参数
string: String - 要检查的字符串suffix: String - 后缀字符串
§返回值
Boolean - 如果以该后缀结尾返回 True,否则返回 False
§示例
Set filename "document.pdf"
Set isPdf EndsWith(filename, ".pdf") # True
Set isTxt EndsWith(filename, ".txt") # False
Set email "user@gmail.com"
Set isGmail EndsWith(email, "@gmail.com") # True