Results for "Category: String Manipulation"
Functions on Strings. Those seem to be difficult but are actually very easy. Count Characters, Vowels, Lenth of String etc.
Takes any numerical value (less a billion) like "203463110" and outputs "Two Hundred Three Million Four Hundred Sixty Three Thousand One Hundred Ten"
This is a recursive function to calculate a string formula. For example: You have a formula like "3*((2+6)*2-2)/(2+2)". You just call the function to get the answer. Hope this is useful to somebody:)
Compares a string to a list of items in another string, and returns how many matches are found
Very simple, almost useless code! Shows all "printable" ASCII characters. I needed this for something else, so I thought I'd post it here for beginners' benefit
This is just an update to the nice piece of code submitted by VF-fCRO on 1/12/2002. I simply added some small features (elapsed time, a different way to loop, minor text edits, etc). Doesn't really change the purpose of the original, just adds a few touches to it. the original is at http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=30734&lngWId=1 I wouldn't really entitle VF-fCRO's submission a "mistake"; he/she actually submitted a demonstration of a better way to handle concatenating strings with a far faster technique, and it doesn't use and API calls or weird, esoteric methods.
Formats SQL strings with quotes and line breaks for use in VB. This was a project that was submitted by another user that I have modified. I have added in the ability to update which SQL clauses will cause a line break, using a txt file. Also I have updated the SQLVarPos so that it uses an array for position location of key words. This also has better tab order and an auto-tab so you are ready to copy your formatted string as soon as you select "Format String".
Checks to make sure the contents of a TextBox or String are only standard ASCII; If it has any extended ASCII, the function will return False.
This is an update to Kurt Joseph Serge's word counter code that was long, clunky and not entirely accurate. Takes a string and counts the "words" (characters separated by spaces) in it. Take a look.
Provides functionality to have a buffer of Undo's in your application so users can go back as far as they want and redo their actions again....
The SpeedString class boost performance on string concatenation. Almost every VB developer uses strValue = strValue & NewData as concatenation. The SpeedString class does the same, but a few hunderds times faster (something up to 1000 times). This project demonstrates the use of my SpeedString class and compares the execution times of both methods.
As a beginner my biggest problem ever was not being able to split a string and i didnt really learn how unil a while ago. splitting a string can be very useful for winsock and data storage type stuff. This works by putting a plus sign (+) between the two peices of data and splitting them based on that. Note: this uses a VB6 function so it will only work in VB6, also note that this code is in the begginer section so dont be a punk. - nerd (www.nerdwareinc.com)
This function takes tag delimited text and converts it for display in a richtext box. Great for email headers (from, to, subject lines). Someone Rank this Thing...Enjoy!!
This will get various statistics about your code, from how many blank lines you have, to how many variables you have declared. This is basically the same as my last version (Code Statistics v3), with a few improvements on the code scanner, and a new feature that lists the amount of variables you declared but never used. Just a note though, it will also list any unused event parameters. Let me know what you think - Eric
Get the statistics of your code. Find out exactly how many lines it is. It is easy to modify this project to include other file types etc.
cool word proccessor that can read what u have wrote ,font size font color bold....
Drag and Drop a Free File onto the List Box. The Application opens the File as Binary and loads it into Buffer Space and scans the contents for Virus Strings. Very easy to do, and commented. It only does a single file right now, looking to add Directories upcoming.
This sample demonstrates a text effect whereby text drawn on the form expands and contracts (i.e., the width and height are continually increased then decreased). For more my code samples visit my personal web site: click above on my full name.
[NOTE: THERE IS A NEWER VERSION] This routine shows how you can process nested search-replace operations on large strings (megabytes) with VB. The program accepts a text-file as input and will output a colorized RTF file. Nothing new about that, but this program will generate large RTF files really fast because it uses a text buffer for string processing. You will see the difference if you try to colorize a 500+ kb XML file, most (all?) other 'colorize' programs on PSC that use native VB will fail on large files.
It has 5 different ways of finding an answer and can even learn. It breaks ur sentence into an array, removes minor words, rearranges the sentence, everything. It demonstrates file parsing, string manipulation, file append, file input, file output, learning. Credit must goto the maker of michael the AI chatter. The interface is pretty similare, the functions are pretty similar, the code is pretty imilar. My prog just concentrates more on getting an answer so it should be better at talking. You can write your own question file and join it to the main one using the Import File Feature (with progress bar). To see the list of copyrights see the author of Michael the AI Chatter.Ask it what its age is, theres a small bug in that but its still cool.