Results for "Category: String Manipulation"
Library of routines for typical string processing, including parsing, translation, and validation. Routines include: - StrReplace(Text, SearchFor, ReplaceWith, [Compare]) As String - StrSplit(Text, SplitOn, [Compare]) As Variant - FromHex(HexNumber) As Long - LeftPad(Value, Size, [PadCharacter]) As String - RightPad(Value, Size, [PadCharacter]) As String - AreLetters(Text) As Boolean - AreDigits(Text) As Boolean - AreLettersOrDigits(Text) As Boolean - AreInSet(Text, CharacterSet, [CaseSensitive]) As Boolean - ParseN(Text, StartAt, PatternArray, ValueArray, [PosPastEnd], [StopAt], [Compare]) As Boolean Clean code with lots of comments in reusable module. Also includes an extensive reference in HTML. Tested with VB6, but should be compatible with all modern versions and VBScript (with minor modifications). Please vote for this code if you like it.
DLL that allows you to write RTF code that is compatable with Windows WordPad. Use this object to convert HTML to RTF, or to generate RTF file on the fly!!!! Don't bother looking anywhere else for this hot little piece of code ( I spent hours on the net looking, finally I gave up and wrote it myself!) Look here for future updates, up next... picture, and table support! Added Bonus: Object that enumerates through the fonts on your system and gets the Picth, and Font Family for each one!!!!!!!!
Absolute Easiest Way To Find And Replace Text in Any Control - ie: labels, textboxes, basically ANY control that supports text editing!!
The zip includes an Expression Parser Class that parses and computes mathematical expressions (such as "-pi * sin(50 + 3 * 4) / -3"), and a demo client application. The parser supports built-in and user defined constants and built-in functions. Also, it demonstrates a variety of error-handling and VB tricks.
Increments text string with alpha and numeric characters.
Takes a string and evaluates it, thus giving the user an answer to a string such as "hsin(1)+hcos(1)", which will be e. The evaluator incorporates an error handler, as well as user entered constants. The function is in the module, easily made to be imported to other programs. A demonstration program is included an shows some possiblities. A help file is not included, but will be available by e-mail. An important point, to keep in mind, that almost all functions must be entered in form of sin(45). If a function has one argument, enter it like sin(45), otherwise, put first argument, function, second argument, as in 2+1.
This function is to strip all instances of a character out of a string. Its fairly compact and simple. Hope its helpful to someone. :)
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.
Demonstrates how to add an item to a listbox in any desired index. (i.e. Add an item between the 2nd and 3rd item in a listbox.) Demonstrates how to shuffle/rearrange items in a listobx (i.e. Moving an item "up" or "down" the list at runtime).
This will generate a unique serial number from your username! This is very handy for protecting your software! The code is fully commented so u can see what the hell is going on :o)
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!
This is a combination of InStr and the Like operator. It returns the position of a mask within a string. The parameters are all user friendly variants just like the regular InStr function. Example: InStrLike("Test String 123abc45 Stuff","###*##") returns 13, because 123abc45 matches the mask and it starts at character 13. Hope this is useful to somebody.
RevEx - creates a random alphanumeric string based on a pattern. Think of it as regular expression pattern matching in reverse. Useful if you need to create a random combination of values in a certain format. Letters (lower/upper case) and decimal numbers or any combination or part thereof: boolean, hex, octal values; dates, times, vowels, consonants, phone numbers, zip codes, GUIDs; IP, social security, credit card numbers ... PLEASE VOTE OR COMMENT, THANKS!
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.
Please leave comments. It helps me understand what people want or expect from a program like this. This is quite an advanced word processor. You can manipulate files, use the clipboard, print, print preview, setup page margins. You can also send documents as attachments through the email system, but you need the control, which is free, from Axsoft. Also, Microsoft Agent needs to be installed on your system. I have included the character here. Install it to c:\windows\msagent\chars folder. Once done, enjoy TypePad. If you have VCI VisualSpeller, you can also use this application to spell check. This program also can insert pictures from files, files, plus text files. To have the spell checker, a Borland product must be on your computer. Thank you for your interest.
This program encrypt or decrypt a text, with a key and a checksum checker. Very good program
Finds words starting with, containing, ending with, >
This prgram Encrypts text to a picture. As you may notice its hard to see that picture box has anything but black.But it does if you zoom in.also each pixel in the picturebox holds 3 letters saving you alot of room your private letters on your computer are no longer able to be seen because everyone knows that ifmmp is hello so now you have a picture instead.Very Complex. Easy to understand.Highly commented.Easily made more complex.Check It Out.And PLEASE leave Comments and Vote. Please Vote for this source code. NOW UPDATED http://www.planetsourcecode.com/xq/ASP/txtCodeId.28531/lngWId.1/qx/vb/scripts/ShowCode.htm
Simple reader for kjv.ini by Robert Rayment. This may be of interest to those who want a simple but effective way of displaying large text files using simple VB. You will need to download Clint LaFever's kjv.ini (KJV BIBLE on PSC, I have his permission) and put it in the same folder as this prog. Basically the whole of the file is loaded into a string (most computers nowadays, can cope with this size of file) and an offset table built up to the Book, Chapter and Verse. 3 list boxes then take Book description and Chapter & Verse numbers enabling any Book, Chapter and all its Verses to be displayed quickly in a multi-line, scrollable text box. UPGRADE for Jude which has only 1 chapter -- whoops.
Actually this is kind of fun. This program genaerates 1000000 completely random letters and then uses the microsoft Word Spell check object to look for real words. You can specify the minimum length of text to search for as well as maximum and it will highlight real words. i put an Algorythm that looks for words based on each character position, for example, if "WHOLE" is found it will return 3 words, "Whole", Hole", and OLE". You would be surprised to see some of the words that are generated. Oh well, good for a dyno test on your computer at least. Comments and votes are greatly appreciated.