StringArrayConcatenate

Synopsis

This module concatenates strings of an array separated with a given string. The final string is introduced with a leader string and concluded with a trailer string. The leader, separator and trailer strings are given by the user.

Inputs

Name Type Description

in_strings string [] The String array to be processed

Parameters

Name Type Description UI Control

Leader string Text that is placed before the first element of the array. TextField
Separator string Text that is placed between two elements of the array. TextField
Trailer string Text that is placed behind the last element of the array. TextField
Trigger int Triggers the execution of the Module. UIbutton

Output Ports

Name Type Description

out_string string Output string of the module.
done int Trigger that is updated when the execution of the module is completed.

Description

This module concatenates strings of an array separated with a given string. The final string is introduced with a leader string and concluded with a trailer string. The leader, separator and trailer strings are given by the user.

This can be useful to generate SQL queries.

Example:

  input_strings = {"VA","PA","CA"}
  leader_string = " where STATE =' "
  separator_string = " ' and STATE=' "
  trailer_string = " ' "
  => output_str = "where STATE='VA' and STATE='PA' and STATE='CA'"

Inputs

input_strings[]

String array to be converted into a single string.

Parameters

Leader

String that is placed before the first array element in the ouput string.

Separator

String that separates two array elements.

Trailer

String that is placed behind the last array element.

Trigger

Integer value that is used to execute the module.

Outputs

output_string

The complete output string.

done

Integer value that is set when the module has completed its execution.

Utility Macros

The User Macro StringArrayConcatenate makes use of the Functional Macro StringArrayConcatenateFunc and the UI Macro StringArrayConcatenateUI.

Example

An example application StringArrayConcatenateEg is provided, which shows a simple application of the StringArrayConcatenate macro.

Files

iac_proj/strarrct/sactmods.v Creates the StringArrayConcatenateMods library containing the low-level module StringArrayConcatenateCore and the parameter block StringArrayConcatenateParams.

iac_proj/strarrct/sactmacs.vCreates the StringArrayConcatenateMacs library containing the definition of the functional macro StringArrayConcatenateFunc the user interface macro StringArrayConcatenateUI and the user Macro StringArrayConcatenate.

iac_proj/strarrct/sactapps.v Creates the StringArrayConcatenateApps library containing the example application StringArrayConcatenateEg.

Other Notes

The low-level StringArrayConcatenateMods library containing the module StringArrayConcatenateCore does not specify a process. By default the express process will be used.

Authors

Brian Selle, Leon Thrane, Ian Curington
Advanced Visual Systems Inc.

Modifications

Paul G. Lever
Manchester Visualization Centre
Tobias Schiebeck
International AVS Centre

Contact

International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL