CT_CHARMIX

 CHARMIX()
 Mixes two strings together

 Syntax

     CHARMIX(<cString1>,<cString2>) --> cString

 Arguments

     <cString1>  Designates a string that is mixed with <cString2>.

     <cString2>  Designates a string that is mixed with <cString1>.

 Returns

     CHARMIX() returns a string that is double the length of <cString1>,
     assuming that <cString2> contains at least one character.

 Description

     This function allows you to mix the characters from two character
     strings together.  The characters from <cString1> and <cString2> appear
     alternately in the result string.  The length of <cString1> forms the
     basis for the maximum count of the resulting mix.  A longer <cString2>
     string is cut down to the length of <cString1>.  A shorter <cString2> is
     processed from beginning to end, wrapping to the beginning again until
     there are no more characters in <cString1>.

 Note

     .  This function can be used to recombine strings extracted by
        CHAREVEN() or CHARODD().

 Examples

     .  This is an example of a simple mix:

        ? CHARMIX("ABC", "123")       // "A1B2C3"

     .  This is a mix where the second string is shorter:

        ? CHARMIX("ABCDE", "12")      // "A1B2C1D2E1"

     .  This is a mix where the second string is longer:

        ? CHARMIX("AB", "12345")      // "A1B2"

     .  What you can do with this?

        ? CHARMIX("HELLO". " ")       // "H E L L O"

     .  If the second parameter is null, then the first parameter is
        returned unchanged:

        ? CHARMIX("HELLO", "")        // "HELLO"

See Also: CHAREVEN() CHARODD() EXPAND() SCREENMIX()

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.