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
(2,917 Views)
Solution
Accepted by topic author Clint1000

Hi Clint,

 

this way:

check.png

Best regards,
GerdW


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

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

Message 3 of 7
(2,880 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
(2,877 Views)

Yes

Message 5 of 7
(2,873 Views)

nice...thanks..

0 Kudos
Message 6 of 7
(2,859 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
(2,847 Views)