for my parse() method I need to extract tokens from the returned string. (already converted it from the hexadecimal string). In c/c++ I use strtok_r or strtok_s in a while loop that returns the next token in the string. Is there an equivalent of this in groovy when writing a HE driver ?
I use String.split() which takes an optional parameter of regex to use as delimiter. And then iterate over the resulting List.
1 Like
Thanks. So I assume the regex parameter is a regular expression such as "[ \t]" for typical white space delimiter or "\n" for splitting lines. Does it return the full string is there is no delimiter or does it throw an error?
There are a couple of different versions, but the behavior seems to be as you described: String (Java Platform SE 8 )
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.