LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

append a constant string to every element in an array

subVI doesn't help me because Concatenage Strings has the feature to add an unlimited number of inputs.
Anyway, it would be nice if it was possible to choose whether I want to output an array or a single.

0 Kudos
Message 11 of 14
(138 Views)

@maxnoder1995 wrote:

subVI doesn't help me because Concatenage Strings has the feature to add an unlimited number of inputs.
Anyway, it would be nice if it was possible to choose whether I want to output an array or a single.


But then it would no longer be concatenation. "string concatenation is the operation of joining character strings end-to-end"

Concatenation - Wikipedia

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 12 of 14
(136 Views)

It is 'concatenate' in a broader sense here to mean combining the constant with each element, whether by prepending or appending. The name reflects the operation's intent, even if it's not strictly about end-to-end concatenation.

0 Kudos
Message 13 of 14
(127 Views)

Hi Max,

 


@maxnoder1995 wrote:

I can add 2 to each element of array without for loop.
why can't I append/prepend constant string to every element?


Because "adding" is something different than "concatenating" (or appending/prepending)!

 

Btw. the LabVIEW help is quite clear:

Concatenates input strings and 1D arrays of strings into a single output string.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 14
(126 Views)