I had written the syntactically correct statement:

var friendList : List<String> := friends.split(';');

This did not what one would expect: given the string "a;b" is split the string in to a list of one string: "a;b". The reason for this was found in the Java code:

showFriendResults_friendList1 = utils.StringType.splitWithSeparator(showFriendResults_friends1, "';'")

Changing the WebDSL statement to the, also syntactically correct, statement:

var friendList : List<String> := friends.split(";");

yielded the expected result:

showFriendResults_friendList1 = utils.StringType.splitWithSeparator(showFriendResults_friends1, ";")

Obviously, the first was expected to work the same, especially since it was syntactically correct. It seems that single quotes can be used as string literals as well, but at least for consistency the single quotes themselves should not be included in the resulting string literal.

Submitted by Thomas Schaap on 31 March 2010 at 10:37

Log in to post comments