Download 2 Overview - Inductive Automation

Transcript
Appendix B. Expression Functions
443
"hello"
"world"
split("boo:and:foo", ":")
... returns
parts
"boo"
"and"
"foo"
split("boo:and:foo", ":", 2)
... returns
parts
"boo"
"and:foo"
8.6.14 stringFormat
stringFormat(format, args...)
--MISSING--
8.6.15 substring
substring(string, startIndex, [endIndex])
Substring will return the portion of the string from the startIndex to the endIndex, or end of the
string if endIndex is not specified. All indexes start at 0, so in the string "Test", "s" is at index 2.
substring("unhappy", 2)
... returns "happy"
substring("hamburger", 4, 8)
... returns "urge"
8.6.16 trim
trim(string)
Takes the argument string and trims of any leading and/or trailing whitespace, returning the result.
trim("Hello Dave
")
... returns "Hello Dave"
trim(" Goodbye.")
... returns "Goodbye."
8.6.17 upper
upper(string)
Takes a string and returns an upper-case version of it.
© 2011 Inductive Automation