Advertisement

Results for "Category: String Manipulation"

3_2004-2005 #138177
Format Fancy Number (##st, ##nd, ##rd, ##th)

This function adds st, nd, rd, or th to the end of a string of numbers based on what the number is. For example, the following code can produce the following output, "Thursday, November 23rd, 2000" : Format(Date, "dddd, mmmm ") & FormatFancyNumber(Day(Date)) & ", " & Year(Date)

3_2004-2005 #138196
A Daitch-Mokotoff SoundEx Function

Complete, ready to use, SoundEx function to encode a passed alphabetic name and return a six character Daitch-Mokotoff code following the Daitch-Mokotoff (D-M) rules available at the sites listed in the source code. The D-M algorithm resolves some deficiencies that occur in the older Miracode/Soundex system (also known as the "Russell"/NARA system - used by the US Census Bureau). The benefits include: 1) Six meaningful letter sounds (versus four so that Peters is different from Peterson). 2) The initial letter is also sound encoded. 3) More sound variations (10 basic codes versus seven and double code sounds). 4) Improves sound matching for Jewish, Slavic, and Germanic names. Coded as a VB module with Public SoundEx function. Uses simple visual basic coding, and should be usable in anything supporting VB/VBA. Code Zipped because it is a complete module. Code commented

3_2004-2005 #138306
InStr for lists

will search a listbox's contents for a string returning a True if the string exists and a False if it dosent

3_2004-2005 #138307
Add Item to listview

takes a string like "Johnny*(722)555-5555*35" and splits it into columns on a listview control(designed for Report view)

3_2004-2005 #138327
String Control

This code can do many modifications to a string. (See screenshot for more details). I was tired of seeing programs that showed only one string modification so I programmed something that could modify a string in more than one way. (Code is explained).

3_2004-2005 #138348
A smaller encryption example

Takes a string and shifts each character in that string according to a password set by the user. Much smaller than most of the examples of PSC.

3_2004-2005 #138379
A Function that removes all of a chr from a string

This is a fairly basic code, but I had someone ask me how to do it, so I figured since I made it I might as well post it. Basicly this is a simple function which you can add to either a bas, or a form, and then you call it, and it removes all occurenses of a character within a string. IE.(My name is steve) if you wanted to remove all the spaces you could use this.

3_2004-2005 #138384
Rich To HTML

A function that converts rich text to standard HTML with the use of calling one simple function. Example form included. NOTE: The Microsoft RichTextBox Control is required.

3_2004-2005 #138386
A very simple Encrypt and Unencrypt

This is a very simple encrypt/unenceypt and when i say simple i mean simple. works for any string containg the normal chr's ie. (1-9,a-z). Works good tho for simple encrypt.

3_2004-2005 #138400
ReadFile

Read an entire text file into a string in one call.

3_2004-2005 #138457
Reg Key Demo

Generates and Validates a 25Character Registration code. Extensive integrity checking on the validation process to ensure only the original key values can be validated. Well commented and easy to follow.

3_2004-2005 #138468
Speed up code with a factor 1000 using string buffering!

The purpose of this code is to prevent performance leak when repeatingly appending text to a string "the normal way" eg. string1 = string1 & "text". By using stringbuffering you allocate a large ammount of zero-bytes to your string, and then uses the mid function to insert the text you want to append. The biggest gain by using stringbuffering is that you speed ud your code by a factor 1000 but it's allso harder to get your code to crash with a "Out of memory" error (IF YOU LIKE THE CODE, PLEASE VOTE!)

3_2004-2005 #138513
Fastest String Concatenation Yet In Visual Basic

This is the fastest string concatenation method you'll ever come across in Visual Basic. I use a novel buffering technique that leaves the competition choking on my dust.

3_2004-2005 #138532
Lightning Fast Word Counting

A small ultra-fast function used to count the number of words in a string.

3_2004-2005 #138548
Convert language query string into SQL statement

"PARSE" function converts search string (like in altavista/with pluses, minuses and quotations) into SQL query string for database search. To make this work in your database, you need to replace "table" and "field" words with appropriate values for your database. It's done in VB6 but will work in other versions as well.

3_2004-2005 #138562
IRC TO RTF (Rich Text Format)

Converts IRC text to RTF and displays it in a RichText Box. Supports everything.

3_2004-2005 #138601
Fast Colorize 2 for HTML / XML / XHTML / SGML / ... source viewing

This function accepts a text-file as input and will output a colorized RTF String. Nothing new about that, but this program will generate even large RTF files very fast. You will see the difference if you try to colorize a 500kb XML file. You may add the modules to your code to add HTML/XML/XHTML source viewing capabilities. The code has gotten quite complicated, but the adjustable parts are documented. (changing colors, or the tags that need coloring). You can for example color all tags red. This is version 2. 2001-11-24 Changes: [-] Twice as fast. (500kb/s. on PIII450) [-] Added a cAppendString class instead of using Mid$. [-] Fast string space allocation by API calls. String pointer swapping. (Thanks to VBSpeed) [-] Now uses Regular Expressions to color the 'inside' of tags (THANKS to Gary aka RegX for the idea to use REGULAR EXPRESSIONS. You can download similar projects from RegX here on PSCODE) [-] Added a RTE control to speed up viewing. CREDITS AND COPYRIGHT: MartijnB ([email protected]) Money, rewards, bugs and .. can be send to me (please!) SEE README.TXT

3_2004-2005 #138611
VB Colorizing class

This is a class that allows coloring VB text. Could be modified to do the same for other languages. It is in a sample project that demonstrates its use. It needs some further work to resolve parentheses situations. The ideas of many PSC authors are used here. Please post improvements you make to this code. Have fun!

3_2004-2005 #138619
Token Parser

Allows a programmer to manipulate a string of tokens such as: "Jane;Paul;Harry" or "Name:Paul;Age:21;Gender:M". Note that this routine allows for individual tokens or for tokens that have a key attached. Tokens can then be retrieved by position or key.

3_2004-2005 #138681
Strip Characters from a string

This function is to strip all instances of a character out of a string. Its fairly compact and simple. Hope its helpful to someone. :)

Languages
Top Categories
Global Discovery