From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,162 Views)
Solution
Accepted by 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,142 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,125 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,122 Views)

Yes

Message 5 of 7
(4,118 Views)

nice...thanks..

0 Kudos
Message 6 of 7
(4,104 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,092 Views)