From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, 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,686 Views)

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

0 Kudos
Message 2 of 15
(3,670 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,665 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,655 Views)

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

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

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

0 Kudos
Message 6 of 15
(3,637 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,625 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,620 Views)

Splendid. Thanks a lot.

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