Results for "Category: String Manipulation"
This is a one line code snippet to extract any section of a string using the Split() function. You can actually return the indexed section right in the same line as the Split() without having to assign the Split() to an array.
This code is the first posted on Planet-Source-Code to do more than just ADD and GET INFO from INI files. You can now also DELETE Keys, Values, EVEN SECTIONS. I am working to create functions to rename sections and keys also. Enjoy this code! Fully explained!
Generates a random string of numbers, letters and symbols, then places it in a string. Once this has been done 3399 times (or times set by user) it writes the string to a file under the variable filelocation
Splits a string into an array. If you send a " " it will split all the words into each array position.
Replaces a character in a string with another character. Pretty simple to understand. Uses a For...Next loop.
This code with scan through a string looking for a delimiter of your choice, and will put the text inbetween the delimiters into seperate elements of an array.
Open/Save/Undo/Cut/Copy/Paste/Delete/Clear/Find/Find Next I write this code becouse i know there is some beginer who nead help whit Text manipulatin, like I do when i start programing (1996)... so I write this ...
Hi this is a little String Manipulation project I made To help beginners understand strings and people at other levels I have included all examples of each function to make it easyer. Sorry I have not included many comments if any but I was bussy at the times working on another project anyway I hope you get some Ideas from it. please vote if you like this code and level comments.
Hi this is a project that will allow you to open a bas file or form and list all the function in a combo box. then you can select the function name form the combo box and it will display that function in a text box. at this time it only works in function names eg function centerform(frm as form) but you can change it to do other string like sub or private subs anyway have a look at the example.txt I have left in the folder and open that up and you will see. anyway I hope that someone might find some us of it please vote if you like it... bye... :)
Revised Roman Numeral generator. This version will in theory generate numbers in excess of 1000000 using the standard numbering conventions, i.e. 5000 is equal to a V with a line above and below..
Makes a string http querystring friendly by replacing all non-alpha and non-numeric characters with the appropriate hex code. Helpful when using the wininet API. example: "(Find This)" becomes "%28Find%20This%29"
Sort Arrays at lightning speeds! I guess you could say this is the sequal to the TurboSort routine I recently uploaded. One of the comments pointed out that the CopyMemory API was about as fast as VB could swap strings, but the sort algorythm (BubbleSort) was poor and that the QuickSort algorythm was much faster.After some searching on the mothership, I found out how the QuickSearch algorythm worked and viola, here it is. This truely is fast. Here are the tests results. My system is a P233 with 128MB of RAM. I generated an array of 10,000 rows. Each row contained 100 random characters ranging from A-Z. I performed three tests. Here are the times in milliseconds. BubbleSort QuickSort Test 1 131,195.3 398.438 Test 2 131,351.6 421.875 Test 3 130,882.8 390.625 Whew!
Sort arrays much faster with a better string swapping routine! Wow, I couldn't believe all the rewrites of the same sorting routines in PSC. "Look at mine", "No, use mine", yadda, yadda, yadda. They all use the horribly slow: vTemp = String1 String1 = String2 String1 = vTemp Geezzzz - When you have to sort 30,000+ strings this is slllooooowwwwwww. Here's a solution. It uses the the same sorting routine (or choose your own), but implements a much faster swap routine using the CopyMemory() API. Now, instead of swapping strings, which in my case could be up to 9,000 characters, you are only swapping a 4 byte memory address. Rock On!!
This function searches a text string for possible phone numbers and returns an array of those numbers. It allows you to specify a default area code, too. (If you know an easier or more elegant way to do this, let me know!) Doesn't work for international numbers.
This code will get text from listbox's on 32 bit software using VB3. I've been trying to find a way to do this for a long time now. It was not possible in the past because getting listbox text using vb3 for 32 bit programs, required User32 and Kernel32 which vb3 did not allow. So I looked and looked for a way to do it and I found it. A DLL called "Call32.dll" allowed me to use 32 bit dll's. So here it is. If you like the code, please vote for me. Also, if someone can lead me on the right path for creating a .HLP file in vb3, I will create a help file on using Call32.dll. Jeffrey C. Tatum - http://www.oaknetwork.com/vb
This will create the 8 or 9 digit number that goes along with the log on packet for the newest version of the AIM TOC Protocol (version 2.0). The number that it makes, is based on the screen name and password. I guess it was a security feature added in, to prevent users from making AIM Crackers.
This code returns a boolean expression that declares if a string is a valid email address or not. It returns true if the string is valid, false if not
This code converts UNIX files to DOS files and DOS files to UNIX files
takes a string like "Johnny*(722)555-5555*35" and splits it into columns on a listview control(designed for Report view)
will search a listbox's contents for a string returning a True if the string exists and a False if it dosent