LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate a string with a known length with a particular character.

Solved!
Go to solution

I have a string take for example : labview , I would like to convert it into a string with look like this: ******* . 

 

My logic should be like, first find the string length, and then replace the character with *. 

 

Can anyone tell which blocks I should use to make this possible.

0 Kudos
Message 1 of 18
(2,538 Views)

Are you trying to replace the strings or you want to display the string as password??

If you want to display the string (control/indicator) as password you can try below method by just right click.

password display.png


CLD Using LabVIEW since 2013
0 Kudos
Message 2 of 18
(2,531 Views)

These are quite rudimentary operations. Browse the string functions and see what you find. It is all there. Have you taken any courses? The forum board lists training resources to get you started.

 

(I am also curious if you really just wanted to set the string to password display)

Certified LabVIEW Architect
0 Kudos
Message 3 of 18
(2,504 Views)
Solution
Accepted by msabah38

These are two techniques I would use

santo_13_0-1642522287665.png

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution
Message 4 of 18
(2,460 Views)
Solution
Accepted by msabah38

I agree with some of the other posters that you are probably looking in the wrong place for a solution. can you explain in more detail what you are actually trying to do?

 

In any case, here's one possible solution (string size, for loop, indexing tunnel, concatenate strings):

 

altenbach_0-1642533947411.png

 

Message 5 of 18
(2,448 Views)

Here's another way...

StarSrting.png

 

But like the others I wonder why you would need to do this...

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 18
(2,445 Views)

@RTSLVU wrote:

Here's another way...

 


You need LabVIEW 2021 to do it this way. 😄

0 Kudos
Message 7 of 18
(2,425 Views)

@altenbach wrote:

@RTSLVU wrote:

Here's another way...

 


You need LabVIEW 2021 to do it this way. 😄


This was feature released in LabVIEW 2012

 

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Add-a-quot-Concatenate-Indexing-quot-option-for-array...

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 8 of 18
(2,421 Views)

I think he was giving you a hard time because you posted it using LabVIEW 2021. Not that what you did was not available before that. 😁

Tim
GHSP
0 Kudos
Message 9 of 18
(2,400 Views)

rs.png

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 10 of 18
(2,393 Views)