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

AVEVA™ Plant SCADA

StrPad

  • Last UpdatedJul 18, 2023
  • 1 minute read

Pads a string with a number of occurrences of another string. Padding can be added to the left or to the right of a string. If the string is already longer than the required string length, the string is truncated.

Syntax

StrPad(String, PadString, Length)

String:

The source string.

PadString:

The padding string.

Length:

The length of the string. If a positive length is specified, padding will be added to the right of the string. If a negative length is specified, padding will be added to the left of the string.

Return Value

A padded string.

StrFill

Example

Variable=StrPad("Test"," ",10);

! Sets Variable to "Test ".

Variable=StrPad("Test","abc",-14);

! Sets Variable to "abcabcabcaTest".

See Also

String Functions

Using the Caret Escape Sequence Character

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in