User Tools

Site Tools


visual3d:documentation:pipeline:expressions:string_functions

String Functions

This page contains a list of all functions that modify or parse string data.

Modify

These functions modify existing string data.

String_To_Lower

String_To_Lower(string) - returns the input string with all upper case characters converted to lower case

Set_Pipeline_Parameter_From_Expression
/PARAMETER_NAME=TEST
/EXPRESSION=STRING_TO_LOWER("XXXXXX")
/AS_INTEGER=FALSE
;

::TEST = “xxxxxx”

Create_Text_Data
/SIGNAL_FOLDER=SCOTT
/SIGNAL_NAMES=NAME
/TEXT_DATA=Hello World
! /TEXT_FILE_NAME=
! /PROMPT_ON_EMPTY=TRUE
;

Evaluate_Expression
/EXPRESSION=STRING_TO_LOWER(TEXT_DATA::SCOTT::NAME)
! /SIGNAL_TYPES=
! /SIGNAL_FOLDER=ORIGINAL
/SIGNAL_NAMES=
/RESULT_TYPES=TEXT_DATA
/RESULT_FOLDERS=SCOTT
/RESULT_NAME=SCOTT_LOWER
! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
;

TEXT_DATA::SCOTT::SCOTT_LOWER = “hello world”

String_To_Upper

String_To_Upper(string) - returns the input string with all lower case characters converted to upper case

Set_Pipeline_Parameter_From_Expression
/PARAMETER_NAME=TEST
/EXPRESSION=STRING_TO_UPPER("yyyyyyy")
/AS_INTEGER=FALSE
;

::TEST = “YYYYYY”

Create_Text_Data
/SIGNAL_FOLDER=SCOTT
/SIGNAL_NAMES=NAME
/TEXT_DATA=Hello World
! /TEXT_FILE_NAME=
! /PROMPT_ON_EMPTY=TRUE
;

Evaluate_Expression
/EXPRESSION=STRING_TO_UPPER(TEXT_DATA::SCOTT::NAME)
! /SIGNAL_TYPES=
! /SIGNAL_FOLDER=ORIGINAL
! /SIGNAL_NAMES=
/RESULT_TYPES=TEXT_DATA
/RESULT_FOLDERS=SCOTT
/RESULT_NAME=SCOTT_UPPER
! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
;

TEXT_DATA::SCOTT::SCOTT_UPPER = “HELLO WORLD”

To_String

To_String(input) - converts the non-string input into its equivalent string representation.

Set_Pipeline_Parameter_From_Expression
/PARAMETER_NAME=TEST
/EXPRESSION=To_String(2)
! /AS_INTEGER=TRUE
;

::TEST = “2”

Parse

Given a pipeline parameter that is a string, there are four commands that extract a portion of a string and one command for measuring the string. Each of the examples below uses the same input string:

::TEST_STRING = A123456789

String_Left

STRING_LEFT(string,index) - returns the substring from the beginning of string up to, but not including, the 0-based index.

Set_Pipeline_Parameter_From_Expression
/PARAMETER_NAME=TEST_LEFT
/EXPRESSION=STRING_LEFT("&::TEST_STRING&",3)
/AS_INTEGER=FALSE
;

::TEST_LEFT = A12

String_Right

STRING_RIGHT(string,index) - returns the substring from the end of string starting from, but not including, the 0-based index from the end.

Set_Pipeline_Parameter_From_Expression
/PARAMETER_NAME=TEST_RIGHT
/EXPRESSION=STRING_RIGHT("&::TEST_STRING&",3)
/AS_INTEGER=FALSE
;

::TEST_RIGHT = 789

String_Mid

STRING_MID(string,index, length) - returns the substring of the specified length, starting at the 0-based index.

Set_Pipeline_Parameter_From_Expression
/PARAMETER_NAME=TEST_MID
/EXPRESSION=STRING_MID("&::TEST_STRING&",3,3)
/AS_INTEGER=FALSE
;

::TEST_MID = 345

String_Find

STRING_FIND(string, substring, start) - returns the index where the substring is found within string following the start index (0-based). Returns -1 if substring is not found.

Set_Pipeline_Parameter_From_Expression
/PARAMETER_NAME=TEST_INDEX
/EXPRESSION=STRING_FIND("&::TEST_STRING&","234",0)
/AS_INTEGER=TRUE
;

::TEST_INDEX = 2

Set_Pipeline_Parameter_From_Expression
/PARAMETER_NAME=TEST_INDEX
/EXPRESSION=STRING_FIND("&::TEST_STRING&","234",5)
/AS_INTEGER=TRUE
;

::TEST_INDEX = -1

The difference here is that the string we are searching for - “234” - is not in the string being searched after the start index, “56789”.

String_Reverse_Find

String_Reverse_Find(string, substring, index) - Returns the index where substring is found within string by starting the search at the 0-based index and working towards the start. Both substring and index are expressed in terms of the start of string.

This can be useful when searching file paths where we are searching for the file name (which occurs at the end of the entire path).

Set_Pipeline_Parameter_From_Expression
/PARAMETER_NAME=TEST_INDEX
/EXPRESSION=STRING_REVERSE_FIND("&::TEST_STRING&","234",9)
/AS_INTEGER=TRUE
;

::TEST_INDEX = 2

Note that this is the same index that we found with String_Find searching from the start of the string.

String_Length

STRING_LENGTH(string) - returns the length of string as the integer number of characters contained in string.

Set_Pipeline_Parameter_From_Expression
/PARAMETER_NAME=TEST_LENGTH
/EXPRESSION=STRING_LENGTH("&::TEST_STRING&")
/AS_INTEGER=TRUE
;

::TEST_LENGTH = 10

visual3d/documentation/pipeline/expressions/string_functions.txt · Last modified: 2026/03/10 04:56 by wikisysop