Hello,
I'm a new user of B4A and I have to convert small parts of strings into Integers. But it looks impossible???? I tryed several issues (split, matcher,...) but without result. I think split is a good idea to resolve my problem but the Pattern is too difficult to understand !!!!
Here are exemples of the strings I receive :
"1000 addr[75] protocol[DCC28] name[CC 72000]"
"1001 addr[752] protocol[DCC128] name[141R patrick]"
"1025 addr[4] protocol[DCC28] name[Y8000]"
...
I need to :
- catch the first value (1000, 1001, 1025, etc...) in an array of Integers : ID()
- catch the adress number (75, 752, 4,...) in an Array of Integers : Adress()
- catch the third number (28,128,28...) in an array of Integers : Protocole()
- catch the names ("CC72000", "141R Patrick", 'Y8000",...) in an array of Strings : Name()
The last one is not too difficult but for the others I can't believe that there is not possibility to translate into Integer....
Can anyone help me?
Thanks,
Stéphane.
I'm a new user of B4A and I have to convert small parts of strings into Integers. But it looks impossible???? I tryed several issues (split, matcher,...) but without result. I think split is a good idea to resolve my problem but the Pattern is too difficult to understand !!!!
Here are exemples of the strings I receive :
"1000 addr[75] protocol[DCC28] name[CC 72000]"
"1001 addr[752] protocol[DCC128] name[141R patrick]"
"1025 addr[4] protocol[DCC28] name[Y8000]"
...
I need to :
- catch the first value (1000, 1001, 1025, etc...) in an array of Integers : ID()
- catch the adress number (75, 752, 4,...) in an Array of Integers : Adress()
- catch the third number (28,128,28...) in an array of Integers : Protocole()
- catch the names ("CC72000", "141R Patrick", 'Y8000",...) in an array of Strings : Name()
The last one is not too difficult but for the others I can't believe that there is not possibility to translate into Integer....
Can anyone help me?
Thanks,
Stéphane.