From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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,149 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,129 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,112 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,109 Views)

Yes

Message 5 of 7
(4,105 Views)

nice...thanks..

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