16.03.2020, 07:39
Hi
I need to extract the last part of different group names. I use the string.split() for this. What I get is for example;
* table:
[1]
* string: 08-09
[2]
* string: UTE+08=564.004-RM003-UTE
[3]
* string: BLIND
[4]
* string: vest
[5]
* string: ALARM_WIND
I always want to get the last part of the string, but there are not the same number og spaces in every group name, and so I need to always get the last string in the table. For this particulare example, I could just add [5] to get it, but in another group that might return nil or even the wrong part of the name.
So basically; how can I find the highest row number in the table?
I need to extract the last part of different group names. I use the string.split() for this. What I get is for example;
Code:
kode = string.split(grp.find(event.dst).name, ' ')
* table:
[1]
* string: 08-09
[2]
* string: UTE+08=564.004-RM003-UTE
[3]
* string: BLIND
[4]
* string: vest
[5]
* string: ALARM_WIND
I always want to get the last part of the string, but there are not the same number og spaces in every group name, and so I need to always get the last string in the table. For this particulare example, I could just add [5] to get it, but in another group that might return nil or even the wrong part of the name.
So basically; how can I find the highest row number in the table?
There are 10 kinds of people in the world; those who can read binary and those who don't