Results for "Category: String Manipulation"
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.
Ok, this time all the bugs are fixed. Apparently it was giving file errors (Not for me) but thats fixed now guaranteed. If you asked it its age it came out wrong, fixed. Apparantly somebody said one of the files was missing. ell I ve double checked this time.
After looking here and a few other places for a simple code that allows only numerals and not to allow text to be pasted into a textbox and with no prevail I figured it out. Not a major thing but for beginners this will help them.
Updated to v1.1, Fixed few bugs. I always feel I loose a lot of time formating my msgbox strings. String Maker is a program that formats your "normal text" into a variable string usable in visual basic. Lets say, for example, you want a msgbox to show this: ------------------------------------- Warning: The "input" parameters found in the data size field can generate a general protection error ------------------------------------- String maker will format it for you to just copy and paste like this: MyString = "-------------------------------------" & vbNewLine MyString = MyString & " Warning:" & vbNewLine MyString = MyString & "The " & chr(34) & "input" & chr(34) & "parameters" & vbNewLine MyString = MyString & "found in the data size" & vbNewLine MyString = MyString & "field can generate a" & vbNewLine MyString = MyString & "general protection error" & vbNewLine MyString = MyString & "-------------------------------------" Then you could use it like: MsgBox mystring It also has the capability to create SQL table strings: MyString = "CREATE TABLE [tblThisTable] (" MyString = MyString & "[fldBinary] Binary(20)," MyString = MyString & "[fldBit] BIT," MyString = MyString & "[fildInteger] Short," MyString = MyString & "[fldText] Text(240)" MyString = MyString & ")" All you have to do is execute the string like dbobject.execute mystring. And, as always, it also shows the use of MDI projects, menus, tray icon, popup menu in the tray icon, selections, etc... You are allowed and encouraged to continue this project to grow its capabilities... just keep me informed. Thanx to the guy of the tray area control. Note that you must use the exit menu command to close the program, since pressing the X button in the window's controls will just send the program to the tray area... Pretty much like audiogalaxy. -Fongus
This code show you how to count the letters, numbers, characters ("A","b",etc.), Spaces, Word's, Lenght, etc. in a text.