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: 

Split string with no delimiters

Solved!
Go to solution

Kinda trite topic, but...

I have a string say 1010002. I need to split it  itno two digits groups - 1 01 00 02, if it's uneven - so MSB stands alone.

Thanks in advance.  🙂

0 Kudos
Message 1 of 15
(3,428 Views)

Reverse String + For Loop + String Subset. Put them into VI, mix, cook for three minutes.

0 Kudos
Message 2 of 15
(3,412 Views)

You mean something like this?

 

SplitStr-BD.png

 

SplitStr-FP.png

-----

The best solution is the one you find it by yourself
Message 3 of 15
(3,407 Views)
Solution
Accepted by topic author john7

If you check his comment he doesn't want it reversed, does he?

string.png

arrayss.PNG

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
Message 4 of 15
(3,397 Views)

strange but from string 1010002 i'm getting only 00 02 using the last methods.

0 Kudos
Message 5 of 15
(3,383 Views)

sorry my mistake, last method works just fine. thanks a lot. 🙂

0 Kudos
Message 6 of 15
(3,379 Views)

may be in the same topic i can ask another question - how to assemble the resulting array 1 01 00 02  with dots - like 1.1.0.2 ?

0 Kudos
Message 7 of 15
(3,367 Views)

Here you go. The 0 case is empty

string2.png

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
Message 8 of 15
(3,362 Views)

Splendid. Thanks a lot.

0 Kudos
Message 9 of 15
(3,351 Views)

I would do it this way. (wait for Christian to get much simple logic)

 

SplitStr-BD-1.png

 

SplitStr-FP-1.png

 

You can change the delimeter in whatever way you want.

-----

The best solution is the one you find it by yourself
Message 10 of 15
(3,334 Views)