Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tokenize string with zero length components
#1
I am in need to tokenize a string which contains some zero length components as in the example which it follows :

Macro temp
Trigger SF12     Help - how to add the trigger to the macro
Code:
Copy      Help
str s="164```````````````123```"
ARRAY(str) arr
int nt = tok(s arr 16 "`")
out nt

In the above example nt is accessed as 2. I wonder whether there exists a flag to obtain the actual number of tokens, which is 16 in the above example.

Let me add that it works properly using a findrx routine, but programmatically it is slower.


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)