Advertisement

Results for "Category: String Manipulation"

Java_Volume1 #95195
English To French Translation Program

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.

Java_Volume1 #95239
English To French Translation Program(UPDATE!)

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.

Java_Volume1 #95272
convert/write a number in words

Takes any numerical value (less a billion) like "203463110" and outputs "Two Hundred Three Million Four Hundred Sixty Three Thousand One Hundred Ten"

Java_Volume1 #95274
Extract HREFs (HTML Hyperlinks)

Extract hyperlinks from any HTML file. Create an output HTML file with options like sorting URLs, specifing colors, filtering links....

Java_Volume1 #95289
RichText No API GoTo Line

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!

Java_Volume1 #95337
Generate a random string, with a length within a range.

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.

Java_Volume1 #95356
TypePad

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.

Java_Volume1 #95371
A Unlimited Undo and Redo featured RichText Editor

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.

Java_Volume1 #95420
base64 decoder

Decode base64 encoded Input file into Output file.

Java_Volume1 #95422
Get Info, String Length Known

' 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.

Java_Volume1 #95432
basNamesAndDates

This is a .bas module that contains a few string manipulation functions I find useful in the real word. MakeProper replaces the limited proper case functions of VB with code that will format your string in title case, but not force mid-word capital letters to lower case. So "John Smith III" or "MacDonald" comes out correctly if typed are typed as "john smith III" or "macDonald". Initial letters of words are capitalized, but other letters are left as typed. DateWord takes a date and converts it to the phrasing used on legal documents, so 1/1/2000 would return "1st day of January, 2000." MailingLabelText accepts a number of inputs and returns a UDT that offers many variations on the name and address for use in creating mailing labels and other reports containing name and address data. The proper business ettiquette is observed in that the presence of an honorific like "Esquire or MD" eliminates the "Mr." or "Dr." Look for an update of this soon with more functions for string manipulation. The other functions are used by these three. LogError is pretty useful, too, come to think of it! I don't care about winning any prizes, I just wanted to contribute to a site that has helped me out so much. Your feedback is welcome all the same. PLEASE STILL RATE THIS SO I WILL KNOW WHAT YOU THINK!

Java_Volume1 #95536
Number to Text Up to Billions with Bonus Uppercase (Updated)

That's right, all positive long values up to 2147483647. This simple algorithm can translate any positive long value to its string equivalent, both English and Spanish. The principle is simple: Process three digits at a time because the cycle is repetitive every three digits. The only thing you have to append every time is the order qualifier: Thousand, Million, or Billion. The code of the main function is commented, and the other functions are just plain very easy, so no commenting there. The user interface shown here is very simple because the object of this post is the functionality! :) BONUS: Included (and made just for fun) there is a custom uppercase function. It was programmed under the principle that switching between lower and upper case, all you have to do is flip bit &H20. It also writes to the source string directly by mapping an array to the string buffer (advanced stuff). I did not benchmark, but supposedly, this upper case method should be a lot faster than regular string manipulation, although I don't know if it is faster than the VB upper case function. If you want to implement this in one of your applications, all you have to do is drop the module in. Please vote and comment. UPDATE: Run-time error 9 in uppercase function solved. It was a silly error.

Java_Volume1 #95570
Compare 2 Strings

This VERY short function compares 2 strings and returns a number (that can be converted into percentage if multiplied by 100) that represents how closely related 2 strings are. For instance "ABCDE" and "ABCDF" would return say.... .8 (80%). Great for suggesting fixes for spelling errors et cetera. Feel free to use, abuse, and manipulate the code however you want, I'm sure it's not original, but I know it can be helpful :).

Java_Volume1 #95621
Add Colored Text to RichTextbox

Adds the text to a textbox, checking for length overflow. First, it checks, and if the textbox exceeds 15,000 characters, it strips out all but the last 2000 characters to make room for the new text. It doesn't break in the middle of lines - it only deletes 'whole lines.' Then it adds the text to the end, using the color you specified (if any), and scrolls to the end of the textbox. I use it all the time, got tired of cutting/pasting out of old projects, thought I'd put it here on PSC.

Java_Volume1 #95630
All Chars

Very simple, almost useless code! Shows all "printable" ASCII characters. I needed this for something else, so I thought I'd post it here for beginners' benefit

Java_Volume1 #95661
Advance TCP/IP Text Box

A textbox for TCP/IP or DNS entry with validation and formatting. It behaves like Windows TCP/IP entry. Very nice in developing program that requires valid IP entry.

Java_Volume1 #95720
How to use VB's InStr with a String

This example I put together teaches you how to use the InStr function with a string. InStr is very important to use because you can get certain information from a String by using it. Example: say a String has your first and last name in it like "Mike Canejo". InStr allows you to get just the last name or first name. First and Last name are just an example. You could do tons of things with Instr. This is very important for a beginner to know trust me. You'll be surprized if you end up using it in your next vb project :)

Java_Volume1 #95723
Autosize a Label Caption

This small and very simple sub will format the caption of a Label control if the text is too big to display in the control. The sub will trucate the text and append "..." to the end of the text (indicating to the user that they are not seeing the full text). VB automatically wordwraps the caption of a label if it is too big, however, this results in the caption being truncated only where there is a space. Also, you can see the top of the next line of the caption. Example Make and Model: Cadillac becomes: Make and Model: Cadillac Eldor... I find this extremely useful when I don't know the maximum length of the text the label will contain, or if I don't have enough screen real estate to make the Label big enough. Just pass a label to this sub for formatting.

Java_Volume1 #95752
IsNullEx

This code provides an IsNull function like that used in SQL Server. This allows you to check if a variable contains null, and if so return a specific value. This can prevent you from having to write things like iif(not isnull(rst!FieldName), rst!FieldName, ""). For new programmers, especially those working with databases, you will quickly become aware that trying to access a database field that contains a null value often results in the dreaded error #94 - Invalid Use of Null, which means you constantly have to write code to trap for that possibility.

Java_Volume1 #95851
Convert RichText to Encrypted HTML!

This is an incredible program that lets you generate encrypted self-decrypting HTML files! It converts RichText to encrypted self-decrypting HTML files! Just type in your message in RichText format, choose a Password, and it automatically encrypts your message and generate that self-decrypting HTML file. Cool! How do you get the files decrypted? Simply with any IE browser, open it, type your Password, and you'll have the message automatically decrypted!

Languages
Top Categories
Global Discovery