Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

StringLeft() 函数

  • Last UpdatedFeb 05, 2018
  • 1 minute read

从字符串的开头起返回指定数量的字符。

语法

result = StringLeft (string, length)

参数

string

文本、消息标记名或字符串表达式。

length

要返回的字符数。数字、模拟标记名或数值表达式。

示例

StringLeft("Hello World",5) 返回 “Hello”。

StringLeft("Hello World",20) 返回 “Hello World”。

StringLeft("Hello World",0) 返回 “Hello World”。

备注:如果将 0 作为 length 传递给 StringLeft() 函数,则返回整个字符串。

In This Topic