Product Site

5.1.7.29. bitOr

Returns a string composed of the receiver string and the argument string logically inclusive-ORed, bit by bit. The encodings of the strings are used in the logical operation. The length of the result is the length of the longer of the two strings. If you omit the pad character, the OR operation stops when the shorter of the two strings is exhausted, and the unprocessed portion of the longer string is appended to the partial result. If you provide pad, it extends the shorter of the two strings on the right before the logical operation. The default for string is the zero-length (null) string.
Example 5.67. String class — bitor method
Say "12"x~bitOr                   -->    "12"x
Say "15"x~bitOr("24"x)            -->    "35"x
Say "15"x~bitOr("2456"x)          -->    "3556"x
Say "15"x~bitOr("2456"x,"F0"x)    -->    "35F6"x
Say "1111"x~bitOr(,"4D"x)         -->    "5D5D"x
Say "pQrS"~bitOr(,"20"x)          -->    "pqrs" /* ASCII   */