LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

padding a string with spaces

Solved!
Go to solution

How do you pad a string w spaces using "Format into a string" w/o typing /s/s/s/s/s for say 5 spaces ?

 

 

Download All
0 Kudos
Message 1 of 7
(4,656 Views)
Solution
Accepted by topic author Clint1000

Hi Clint,

 

this way:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(4,636 Views)

If you need PASS to be left justified with the spaces after, then the format string would be %-8s

Message 3 of 7
(4,619 Views)

what about between the Lower limit and upper limit and the upper limit and test value??  Do I put a empty string on the format into a string then use the %5s??

0 Kudos
Message 4 of 7
(4,616 Views)

Yes

Message 5 of 7
(4,612 Views)

nice...thanks..

0 Kudos
Message 6 of 7
(4,598 Views)

You really should mark Gerd's message #2 as the solution and not mine.  He presented the idea of how to do it.  All I did was answer a couple followup questions you had.

0 Kudos
Message 7 of 7
(4,586 Views)