Search This Blog

Tuesday, November 5, 2013

@Explode != split()

Hi

Until today I though that @Explode = split. At least more or less.
However they are quite different.


The difference is significant when you use more than 1 character as a separator.

@Explode() usageSplit() usage
  • The default separators are " ,;" (space, comma, semicolon), which means that Domino adds a new element to the text list each time a space, comma, or semicolon occurs in the original string.
  • When you use more than one character to specify separators, each character defines one separator. For example, the specification "and" breaks the string at each occurrence of "a," "n," and "d"; it does not break the string at each occurrence of the word "and."
  • The newline is a separator, regardless of the specification of this parameter, unless newlineAsSeparator is specified as False
  • If delimiter is not specified, then the space character " " is used
  • Split parses expression into substrings consisting of text delimited by the separator character (or the beginning or end of the String), and not containing the separator character.
  • Whitespace is not trimmed.
  • Carriage returns are not trimmed and do not cause separations.



No comments:

Post a Comment