Join Function

αžαŸ’αžšαž‘αž”αŸ‹β€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αž˜αž½αž™β€‹αž–αžΈβ€‹αž…αŸ†αž“αž½αž“β€‹αž“αŸƒβ€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αžšαž„β€‹αž€αŸ’αž“αž»αž„β€‹αž’αžΆαžšαŸβ€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšΒ αŸ”

αžœαžΆαž€αŸ’αž™β€‹αžŸαž˜αŸ’αž–αž“αŸ’αž’ αŸ–


Join (Text As String Array, delimiter)

αžαž˜αŸ’αž›αŸƒβ€‹αžαŸ’αžšαž‘αž”αŸ‹ αŸ–

αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžš

αž”αŸ‰αžΆαžšαŸ‰αžΆαž˜αŸ‰αŸ‚αžαŸ’αžš αŸ–

Text αŸ– αž’αžΆαžšαŸβ€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αž˜αž½αž™Β αŸ”

αž’αŸ’αž“αž€β€‹αž€αŸ†αžŽαžαŸ‹β€‹αž–αŸ’αžšαŸ†β€‹αžŠαŸ‚αž“β€‹ (αžŸαŸ’αžšαŸαž…β€‹β€‹β€‹αž…αž·αžαŸ’αž) αŸ– αžαž½β€‹αž’αž€αŸ’αžŸαžšβ€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αž˜αž½αž™β€‹ αžŠαŸ‚αž›β€‹αžαŸ’αžšαžΌαžœβ€‹αž”αžΆαž“β€‹αž”αŸ’αžšαžΎβ€‹αžŠαžΎαž˜αŸ’αž”αžΈβ€‹αž”αŸ†αž”αŸ‚αž€β€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αžšαž„β€‹αž€αŸ’αž“αž»αž„β€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αžŠαŸ‚αž›β€‹αž‡αžΆβ€‹αž›αž‘αŸ’αž’αž•αž› αŸ” αž’αŸ’αž“αž€β€‹αž€αŸ†αžŽαžαŸ‹β€‹αž–αŸ’αžšαŸ†αžŠαŸ‚αž“β€‹αž›αŸ†αž“αžΆαŸ†αžŠαžΎαž˜β€‹αž‚αžΊβ€‹αžαž½β€‹αž’αž€αŸ’αžŸαžšβ€‹αžŠαž€β€‹αžƒαŸ’αž›αžΆΒ αŸ” αž”αŸ’αžšαžŸαž·αž“β€‹αž”αžΎβ€‹αž’αŸ’αž“αž€β€‹αž€αŸ†αžŽαžαŸ‹β€‹αž–αŸ’αžšαŸ†αžŠαŸ‚αž“β€‹αž‚αžΊβ€‹αž‡αžΆβ€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αž”αŸ’αžšαžœαŸ‚αž„β€‹αžŸαžΌαž“αŸ’αž™ "" αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αžšαž„β€‹αžαŸ’αžšαžΌαžœβ€‹αž”αžΆαž“β€‹αž—αŸ’αž‡αžΆαž”αŸ‹β€‹αžŠαŸ„αž™β€‹αž‚αŸ’αž˜αžΆαž“β€‹αž’αŸ’αž“αž€β€‹αž”αŸ†αž”αŸ‚αž€Β αŸ”

αž§αž‘αžΆαž αžšαžŽαŸ αŸ–


Dim a(3)
Sub main()
    a(0) = "ABCDE"
    a(1) = 42
    a(2) = "MN"
    a(3) = "X Y Z"
    JStr = Join1()
    Call Show(JStr, Split1(JStr))
    JStr = Join2()
    Call Show(JStr, Split1(JStr))
    JStr = Join3()
    Call Show(JStr, Split1(JStr))
End Sub
 
Function Join1()
    Join1 = Join(a(), "abc")
End Function
 
Function Join2()
    Join2 = Join(a(), ",")
End Function
 
Function Join3()
    Join3 = Join(a())
End Function
 
Function Split1(aStr)
    Split1 = Split(aStr, "D")
End Function
 
Sub Show(JoinStr, TheArray)
    l = LBound(TheArray)
    u = UBound(TheArray)
    total$ = "=============================" + Chr$(13) + JoinStr + Chr$(13) + Chr$(13)
    For i = l To u
        total$ = total$ + TheArray(i) + Str(Len(TheArray(i))) + Chr$(13)
    Next i
    MsgBox total$
End Sub

Please support us!