LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to concatenate a string in between another string

hi,

 

i wanted to concatenate 2 strings. i have two strings, s1 and s2. i wanted to concatenate s2 in between the text at specific place in s1, instead at the end. how do i do this?

 

 

please help.

 

thanks sunal

 

 

0 Kudos
Message 1 of 9
(3,554 Views)

You need to use Split string on S1 and then concatenate s1' + s2 + s1"

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 9
(3,549 Views)

Split s1 where you want to insert, then concat s1a, s2, and s1b by expanding the concat to accept 3 parameters.

 

EDIT: Doh, I'm too slow. . .

0 Kudos
Message 3 of 9
(3,548 Views)

How do you know where to insert the text from S2 into S1?

Tim
GHSP
0 Kudos
Message 4 of 9
(3,547 Views)

I have found that a hammer works quite well in these kinds of situations.

0 Kudos
Message 5 of 9
(3,542 Views)

@aeastet wrote:

How do you know where to insert the text from S2 into S1?



That wasn't the question. For now. 😉

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 9
(3,528 Views)

yup.got it thanks.

0 Kudos
Message 7 of 9
(3,512 Views)

@Yamaeda wrote:

@aeastet wrote:

How do you know where to insert the text from S2 into S1?



That wasn't the question. For now. 😉

/Y


No but it will probably make a difference on how you do it.

Tim
GHSP
0 Kudos
Message 8 of 9
(3,469 Views)

@aeastet wrote:

@Yamaeda wrote:

@aeastet wrote:

How do you know where to insert the text from S2 into S1?



That wasn't the question. For now. 😉

/Y


No but it will probably make a difference on how you do it.



I was ready to bet some pennies on what the next question would be ... but it hasn't come yet. 🙂

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 9
(3,461 Views)