Function Character Arrays Class

JoinStringCharacters

Form a string whose character pairs represent the Cartesian product of the characters from two string. Relational Cartesian product operation except that duplicates are not eliminated. A pair of characters is formed by joining each character in string vOne with each character in vTwo.

Signature (Visual Basic / VBA)

Public Function JoinStringCharacters( _
      ByVal vOne As Variant _
    , ByVal vTwo As Variant _
    ) As Variant

Code Example

    JoinStringCharacters("123", "ABC") = "1A1B1C2A2B2C3A3B3C"
    JoinStringCharacters("ABA", "12") = "A1A2B1B2A1A2"

Parameters

Parameter Description
vOne First of the two strings whose characters are to form the Cartesian product. Function returns Null if vOne is Null or cannot be fixed up to a String.
vTwo Second of the two strings whose characters are to form the Cartesian product. Function returns Null if vTwo is Null or cannot be fixed up to a String.