Advertisement

Results for "Category: String Manipulation"

ASP_Volume3 #44569
AmtToWords

This function converts amount in words with supplied currency parameters. e.g. AmtToWords(12345.01, "GB POUND", "PENNY", "GB POUNDS", "PENNIES") will return GB POUNDS TWELVE THOUSAND THREE HUNDRED FORTY-FIVE and ONE PENNY ONLY

ASP_Volume3 #44617
EBCDIC_TO_ASCII

Convert a string in EBCDIC format downloaded from an IBM mainframe to ASCII format.

ASP_Volume3 #44618
ASCII_TO_EBCDIC

Convert ASCII strings into EBCDIC code to upload into an IBM mainframe. This code may be used also as a basic encrypting method. Both ASCII to EBCDIC and EBCDIC to ASCII are included in this code.

ASP_Volume3 #44619
Eval (Evaluate String Expression) *REPOST*

This is a recursive function that evaluates strings expressions. It supports multiple levels of parenthesis, algebraic evaluation of expressions (in this example exponentiation ^ has same level of multiplication and division), function calls, logical operators, string/date/numeric functions and expresion evaluation. This is the base for the creation of a scripting language.

ASP_Volume3 #44626
GetToken

The following code is a Visual Basic function that returns a specific "token" (section/substring of data) from a delimited string list. The function accepts the index of the desired token and also the delimiter as specified by the programmer.

ASP_Volume3 #44639
BMTEncode

Encode/Decode a string. (BMTEncode refined version). If f.ex. enter AA the 2 output chars wont be the same.

ASP_Volume3 #44665
GetTag, GetTagText, CutTag

This is a set of three functions that pull tagged data, such as that from HTML or XML, based on the tag name. I've used this in a number of applications where I've need to store multiple bits of variable-length data in a single string or file.

ASP_Volume3 #44667
formatcurrency

format a text field into a $ currency field.

ASP_Volume3 #44678
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 :)

ASP_Volume3 #44686
Mike's String Checker

This shows you how to search for a "string" inside of a "string" to see if it's there or not. This makes a good E-mail validator.. If the user doesn't put the "@" character, this will know it's not there and return false. This also works the same way if your trying to validate a Full Name. I commented everyline so enjoy and good luck.-Mike

ASP_Volume3 #44727
rtf2html-2.1

This code recieves RTF code as output by a Rich Text Box in VB or MS Word. It outputs the equivalent in HTML. It's in a somewhat BETA form in that it handles a number of but not all of the possible codes. If you encounter a code it doesn't properly convert just send it to me and I'll try to fix the function within 24 hours. I think it does a better job on uncomplicated text than MS Word's HTML conversion.

ASP_Volume3 #44728
RevInStr

Visual Basic 6 has a new function called InStrRev, which searches a string from right to left. I found it very usefeul, so much so that a project of mine relies completely on it. When I tried to work on the project at another location on VB5 I found that the function did not exist. So, I wrote it. I left out the compare method, you can add it if you want

ASP_Volume3 #44738
noresizeform

DUHH

ASP_Volume3 #44739
Add Quotes

This Function Adds quotes to a filename... especially useful when sending an arguement to a program (ie a filename) and it has spaces in it (with spaces if shows up as multiple arguements.

ASP_Volume3 #44755
String Replace *THE FASTEST*

This code is a direct replacement for the VB6 Replace function. Obviously, VB 6 users will have very little (if any) use for the function. It is intended for use with older versions of VB that do not have the in-built Replace function. I noticed a similar piece of code released earlier this week, but it only appeared to handle character replacing and not strings. This version will do both and it's pretty tight and fast.

ASP_Volume3 #44783
Registration Key

A little app that I made to generate a key according to username. Also this app will validate the key. This is a little bit more advanced. Most validation routines actually take the username that is put in, and generates a key for that. Then it will compare that and what the user entered. This leaves a big security hole because anybody with memory editors can actually use the actual program as the keygen. My app actually reverse engineers the key into a username then compares usernames. =) have fun and change it as you like. Also, please vote!

ASP_Volume3 #44829
***Convert TXT file to Executable EXE***

This code convert a TXT file to EXE file.When you convert the file start the EXE and the old file will be typed(like TYPE command) This is really great code NOTE : RUN THE .EXE FROM MS-DOS MODE

ASP_Volume3 #44844
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.

ASP_Volume3 #44849
A simple credits scrolling example using BitBlt

I was recieving several requests after recently making a post concerning a scrolling credits examples, simply saying that I had something similiar that worked in most aspects slightly better, because it used BitBlt and read the credits directly from a text file. I got quite a few emails requesting I send them it, so I just decided to post it to this site. Hope everyone likes it, if not sorry.

ASP_Volume3 #44861
ExtractArgument

I use ExtractArgument (written by my friend Mike Carper) all the time. It returns an argument or token from a string based on its position within another string and a delimiter. For example: I want the "2" in the following string: "1,2,3,4,5,6,7,8,9,10". 'Sample call 'Dim sList as string 'Dim sTown as string 'sList = "POB 145,Dexter Street,Anytown,USA" 'sTown = ExtractArgument(3, sList, ",") 'sTown will be "Anytown" I find this very useful in working with delimited files and strings, and have implemented it in INI settings as well.

Languages
Top Categories
Global Discovery