Results for "Category: String Manipulation"
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"
This is a series of Has.. Codes. It will search a textbox for the following: Lowercase letter, Uppercase letters, Numeric Characters, and Accented Characters. So, if it has lowercase letters or something, it will display a message box. this is a good example of how to use for..next loops, ASCII codes and the Instr Function, then again, this might be a lousy example, you be the judge.
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.
Converts a long address (2220112843) to it's IP address (203.59.84.132)
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..
To split a string into pieces using a certain character as a delimiter. I do not want to get messages saying, "use the Split() function" as this isn't present in VB5. Example of this is "hello to you", with the delimiter as " ". You'll get back 3 variables, one containing "hello", one containing "to" and one containing "you"
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 converts UNIX files to DOS files and DOS files to UNIX files
This code does nothing more than take a word or phrase and convert it to Pig Latin. Now, it is not finished, as I need to somehow figure out how to take in account punctuation. It is almost there, tho, and any suggestions would be nice.
Finally a little example of Artificial Intelligence in VB. This code was not developed by me, but i just want to share with you. I perceived that does not exist any example that uses natural language in the PSC, and focus on artificial intelligence in AIML. Therefore they use to advantage to use the ALICE and the TED, the two robots gifts in this example. Gratefulness special to the Dr. Wallace.
This program translates as you type. Right now I am mainly working on english to french but I have put limited support for french to english. I know that there are lots of sites that can do this for you but I made this so if someone was making a chat program people speaking two different languages could talk to each other. Please leave a comment so I know where to improve. I will try to upload a new version in a few days or so.
This program translates as you type. Right now I am mainly working on english to french but I have put limited support for french to english. I know that there are lots of sites that can do this for you but I made this so if someone was making a chat program people speaking two different languages could talk to each other. Please leave a comment so I know where to improve. I will try to upload a new version in a few days or so.
Takes any numerical value (less a billion) like "203463110" and outputs "Two Hundred Three Million Four Hundred Sixty Three Thousand One Hundred Ten"
Extract hyperlinks from any HTML file. Create an output HTML file with options like sorting URLs, specifing colors, filtering links....
This bas contains a function that sets the cursor position in a Rich Text box to a given line without using API. This is a very fast method - no, it doesn't just scan through and check every line - and works fine even with long RichTextBox texts!
This code will take a range (lower and upper), and output a string of random characters (0-9, A-Z, a-z). I use this to generate a key for encryption, during the key negotiation phase of a connection to an encrypted server. Usage is simple: Dim sKey as string sKey = GenerateKey(10,100) ' this code generates a key with a length between ' 10 and 100 characters.
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 code shows you how to create Unlimited Undo and Unlimited Redo, along with Cut Copy, Paste, and Select All features, in a RichTextBox Control.
Decode base64 encoded Input file into Output file.
' This easy code is design to open a text file, read a line at a time ' and take a set number of characters from the right hand side of each line ' This is a look at the basics of string and file manipulation ' I will also post a a program that will find a character and ' get the data left or right of it.