User Manual

GETTING STARTED


OTHER EDITIONS


LAUNCHERS


MODULES


PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support

ALL USER MANUAL VERSIONS

Ignition 8.1. Offline Version (04/2021)
Ignition 8 Online Version
Ignition 7.9 Online Version
Ignition 7.8 Online Version

Deprecated Pages

SDK Documentation

Employees

Sign In

Skip to end of metadata
Go to start of metadata

This function is used by Ignition's Expression language.

Description

This expression returns a formatted string using the specified format string and arguments. Mainly, this expression is used for building dynamic string objects.

Refer to Data Type Formatting Reference for formatting elements.

Syntax

stringFormat(format, [args, ...])

  • Parameters

String format - The a string that contains formatting elements in it (%s, %d, %i).

String args - The arguments to use in the format. Must match the number of formatting elements in the string. [optional]

  • Results

String - The new formatted string.

Examples
Code Snippet
stringFormat("The boolean value is: %b", null) //Returns The boolean value is: False.
Code Snippet
stringFormat("Hello %s", "world") //Returns "Hello world".
Code Snippet
stringFormat("%s, %s, %s", 1, 2, 3) //Returns "1, 2, 3".
Code Snippet
stringFormat("%d, %d, %d", 4, 5, 6) //Returns "4, 5, 6".
Code Snippet
stringFormat("Today is: %tA", now()) //Returns Today is: Tuesday.
Code Snippet
stringFormat("The current month is: %tB", now()) //Returns The current month is: June.
  • No labels