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

AVEVA™ InTouch HMI

StringMid()

  • Last UpdatedSep 24, 2024
  • 1 minute read

从字符串的起点开始提取特定数量的字符,并返回提取的字符的作为结果。

类别

字符串型

语法

StringResult = StringMid( Text, StartChar, Chars );

参数

文本

要提取一定范围字符的实际字符串或字符串属性。

StartChar

字符串中要提取的首个字符的位置。任何数字或整型属性。

字符

字符串中要返回的字符数。任何数字或整型属性。

附注

此函数与 StringLeft() 函数和 StringRight() 函数略有不同,前者可以同时指定要提取的起始和结束字符串。

示例

StringMid("The Furnace is Overheating",5,7); ‘ 返回 "Furnace";

StringMid("The Furnace is Overheating",13,3); ‘ 返回 "is ";

StringMid("The Furnace is Overheating",16,50); ‘ 返回 "Overheating"

另请参阅

StringASCII()

StringChar()

StringFromIntg()

StringFromReal()

StringFromTime()

StringInString()

StringLeft()

StringLen()

StringLower()

StringReplace()

StringRight()

StringSpace()

StringTest()

StringToIntg()

StringToReal()

StringTrim()

StringUpper()

Text()

In This Topic
Related Links