Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tokenize a string in Lotus Notes Script

I need to split a string into several tokens just like the java code below:

StringTokenizer st = new StringTokenizer(mystring);
while (st.hasMoreTokens()) {
    System.out.println(st.nextToken());
}
like image 306
Rafael Borja Avatar asked Jul 20 '26 14:07

Rafael Borja


1 Answers

You can use the function Split(myString, " "), where the first parameter is your string and the second one the token delimiter.

Here's the solution:

Dim myString = myDocument.myField(0)
Dim myTokens = Split(myString, " ")
Dim fisrtToken = myTokens(0)
Dim secondToken = myTokens(1) 
like image 86
Rafael Borja Avatar answered Jul 22 '26 16:07

Rafael Borja



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!