Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The # Operator operator works on strings, tables and our HL7/X12 objects.

With strings, the # operator is used to get the length or number of characters of a string.

Try out this sample code in the Translator and use the annotation window to see the results:

Code Block
languagelua
local myString = "Hello, World!"
local stringLength = #myString

trace("Length of the string: "..stringLength)

...

See related: