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,394 Views)

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

0 Kudos
Message 2 of 15
(3,378 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,373 Views)
Solution
Accepted by 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,363 Views)

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

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

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

0 Kudos
Message 6 of 15
(3,345 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,333 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,328 Views)

Splendid. Thanks a lot.

0 Kudos
Message 9 of 15
(3,317 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,300 Views)