Results for "Category: String Manipulation"
This sifts through all the text in a RTF file and changes the colour of html tags. It can be used ewither automatically or on the fly (as you type into the RTF box). It currently Chnages the colour of html tags (defined as anything between "") and html comments (""). Enjoy! Please mail me with suggestions
This is an update of version 2.00 that I have done today. Because of some complaints of the speed I have added a speed option which includes "Fastest" (but this only works for options 8 to 12 as the others are so fast you cannot see them work!!) I have added a new FX called "Black Hole" where the text dissapears in to, or out of, the centre of the string. There are now 2 Bandits. The new 2nd one cycles through all the characters at the same time, compared to number 1 which did them one at a time. It should be noted that this is also an example of Framed Options; diabling and enabling them and discovering which have been selected by the user. Also in the Speed textbox you can only enter numbers (I got that off here, but hey!) Although I wrote this in VB5, I see no reason why it will not work in ANY of the other versions as it only uses basic commands like MID and MID$. (Although I am not sure when the MID command came in...) Please rate this!! and I would be interested in any comments you may have. Thanx!
(PLEASE ALSO LOOK AT VERSION 2.10!)This code is an example of 13 different FX that can be easily implemented to a string. I have put them all together and put in quite a few notes explaining what each FX is doing. As you can see from the screenshot each effect can be modified in certain ways. I have written this so that you can have a better understanding of how computers work. I have tried to avoid using many of the built in functions. Each FX may not be the most efficient way of doing them, but I have done it this way to highlight the internal workings. All FX (apart from Rotate) work at a character at a time. Please send in any comments you may have - Good or Bad - so I can improve on it further. If you have any questions then email me. PLEASE RATE THIS. Thankyou.
' This easy code is design to open a text file, read a line at a time ' and take a set number of characters from the right hand side of each line ' This is a look at the basics of string and file manipulation ' I will also post a a program that will find a character and ' get the data left or right of it.
This is a .bas module that contains a few string manipulation functions I find useful in the real word. MakeProper replaces the limited proper case functions of VB with code that will format your string in title case, but not force mid-word capital letters to lower case. So "John Smith III" or "MacDonald" comes out correctly if typed are typed as "john smith III" or "macDonald". Initial letters of words are capitalized, but other letters are left as typed. DateWord takes a date and converts it to the phrasing used on legal documents, so 1/1/2000 would return "1st day of January, 2000." MailingLabelText accepts a number of inputs and returns a UDT that offers many variations on the name and address for use in creating mailing labels and other reports containing name and address data. The proper business ettiquette is observed in that the presence of an honorific like "Esquire or MD" eliminates the "Mr." or "Dr." Look for an update of this soon with more functions for string manipulation. The other functions are used by these three. LogError is pretty useful, too, come to think of it! I don't care about winning any prizes, I just wanted to contribute to a site that has helped me out so much. Your feedback is welcome all the same. PLEASE STILL RATE THIS SO I WILL KNOW WHAT YOU THINK!
Tutorial to teach about LTrim, RTrim, Trim, Left, Right, Mid, StrReverse, creating your own stringreverse function, Replace, InStr, and simple text encryption. 2500 Word approx and examples included
This code should explain the bubble sort ! Bubble sort is a sort algorithm that sortes string in very fast way. There are many sort algorithms but this is the best !
Swap Variable1 for Variable2 using API, this is usefull for creating data processing programs with many stored variables. See Info below
This code provides an IsNull function like that used in SQL Server. This allows you to check if a variable contains null, and if so return a specific value. This can prevent you from having to write things like iif(not isnull(rst!FieldName), rst!FieldName, ""). For new programmers, especially those working with databases, you will quickly become aware that trying to access a database field that contains a null value often results in the dreaded error #94 - Invalid Use of Null, which means you constantly have to write code to trap for that possibility.
It typewrites any text you choose at any given speed
If you ever wanted to have a string with quotes inside this is a handy tip.
A REALLY simple way to do AI chatting. Uses the instr function to see if a word exists in a question. Show how to use instr, arrays, sesquentenial file reading/writing. I haven't programmed in much question's (open chat.dat in notepad) follows structue keyword1,keyword2,keyword3,answer (comma seperates, must do comma even if you use only 1 or 2 keywords)
Use these functions in KeyPress events to format user entries as entry is typed. UCaseKeyPress() converts key pressed to uppercase while LCaseKeyPress() converts key pressed to lowercase.
This Code will Scroll the title of your window(s) like Winamp To the left OR to the right.
Nice feature to help users edit textboxes. The code selects all the existing text when the users focus on the textbox control. This will definitely make your application more user friendly. Please Vote!!!
Makes Twisted Text, Kinda Like Scrambled
A MUST have for any VB programmer - protect your project .exe file with CRC32 checksum validation - makes it virtually impossible for crackers to make software patches for your exe!
This teaches users how to manipulate strings using. Left(),Right(),Mid(),Len(),Instr(),Lcase(),Ucase() and StrReverse().
I looked on this site to find something like this, but i didnt find exactly what i wanted. Here is the source that i created that takes random characters from a text box and places them in a label. It takes a user defined amount of characters including spaces and periods and everything else. =) UPDATED AGAIN!! Now has added features! Can count characters and vowels and words etc! If you know a better way to do this, please email me. This type of program can be used for fortunes, making up new words, choosing usernames(i actually know somebody that did this with a similar program), etc. PLEASE VOTE!!!
This program lets you input text or copy paste from another program. as you type or the text is pasted in, it counts the amount of words, spaces, vowels, consanents, etc. It can be used for programs like icq, text editors, and much more! Please give me feedback and vote!