Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1470

My (improved) Little Token Replacement Engine

$
0
0
I've had this code for a long time and it's worked very well for me.

But I wanted a simple way for the token to tell the engine how to "Case" the text.

E.g.

Proper, Upper, Lower-Case and no change (inserts replacement as it is in the look-up list or table or whatever it is you're using).

The attached code is what I landed on.

I'm super-pleased with it.

Thus:

(The word in the Look-up is entered as "bIg")

<Adjective> = "Big"

<adjective> = "big"

<ADJECTIVE> = "BIG"

<aDjective> = "bIg" ' Any random capitalization works as long as it doesn't meet the criteria for lower, upper and proper cases.

Now you can easily create your own Mad Libs.

See comments in the Project.

Token Engine (Mad Libs).zip
Attached Files

Viewing all articles
Browse latest Browse all 1470

Trending Articles