Results for "Category: String Manipulation"
This takes 2 strings and returns the percent alike that they are. (i.e. "test string number 1" is 86.48% similar to "teststring numb 2") This function is very useful! You can use it in databases to match data that may have errors in it. Examples being people's names, company names, addresses, or anything else where you may encounter misspellings or inconsistencies in the data. Your feedback and/or votes are greatly appreciated! -- NEW - updated to use byte arrays instead of strings, 50-300% performance improvement! An implementation of the , Ratcliff/Obershelp/Levenshtein method.
This will uppercase the first letter of a every word in a string. For Example "this is a string" -> "This Is A String". You need only 1 line of code.
Converts two character strings of A-Z or AA-ZZ into integer equivalents. Example: User inputs "A", returns 1, user inputs AE, returns 110 and so on.
Several examples on how to totally manipulate a string. How to Reverse Strings, Add Spaces, make a string "Elite", etc. Also demonstrates how to get letters from a string and add to them or remove them. It is heavily commented and should really help a lot of people. Cool stuff. (:
Just a little snip of code that lets you trim a specified number of characters from either side of a string.
Allows you to parse strings like those excel spread sheats. Example : Text1.Text = "Me,You,Us" MsgBox(Parse(Text1.Text, ",", 1)) Would return "Me"
Compares a string to a list of items in another string, and returns how many matches are found
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.
THIS VERY COOL FUNCTION TAKES A NORMAL STRING AND CONVERT EVERY CHARACTER IN IT FROM UCase TO LCase OR FROM LCase TO UCase... CHECK IT OUT!! AND VOTE IF YOU FIND IT USEFUL
This Moves a Forms caption from left to right.
The passwords typed in a textbox can be read even if the * appears. But there is a way to prevent this. This is why i created this code. It prevent users from using programs like Spy to read the password (http://come.to/kobik) if the URL don't change.
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 code show you how to count the letters, numbers, characters ("A","b",etc.), Spaces, Word's, Lenght, etc. in a text.
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 is a subroutine to automatically wrap a text string in whole words to a printer.
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!
With this extremely easy code, you can erase a character at the end of a string or in a textbox with a click of a button. Very easy code and every line is commented. DON'T forget to vote.
Strings play an important role in every software. This tutorial is big, it has everything that a beginner wants. This version is modified to remove some mistakes in the previous one, and adds some information about instr. I'd be glad to see your feedback. Thanks! Note: Since I am no guru, this could be all wrong, use it at your own risk.
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.
This small function will strip out the unreadable characters and return readable characters in a string. This works great for stripping thoes little boxes out of the text that you just snagged from a web page. I know that a lot of you have used my code, but have not voted. It would be nice to see some feedback in the form of a vote. Thanks.