Advertisement

Results for "Category: String Manipulation"

C_Volume2 #71911
Auto-Select Text on Focus

Nice feature to help users edit textboxes. The code selects all the existing text when the users focus on the textbox control. This will definitely make your application more user friendly. Please Vote!!!

C_Volume2 #71929
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.

C_Volume2 #71936
BMTEncode

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

C_Volume2 #71945
formatcurrency

format a text field into a $ currency field.

C_Volume2 #71961
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

C_Volume2 #71973
Copy/Cut/Paste/Undo

I was just poking around this site, and noticed that a lot of folks were making the copy/paste/cut/undo functions more difficult then they really needs to be. Rather then writing your own functions, make use of the SendMessage API and let Windows do the work for you.

C_Volume2 #71984
Rich Text Tag Editing Demo

This demo shows some of the capabilities of editing RichTextBox tags to achieve very fast global formatting. Great for Syntax Highlighting etc.

C_Volume2 #72056
Character counter

A FAST and EASY way to count the number of occurrences of one string within another! Please vote for this tip if you find it useful.

C_Volume2 #72059
Base64 Codec

The original source code was from someone (AndrComm or Sebastien?) else. I recode the whole thing, but having reference to the original. Anyway thanks, whoever who are who wrote the original code (yeahh.. all creadits to him) since i learnt some performance optimization (my original codes are tremendously slow).I did some code clean up and comments. The encode speed increased by 20%, decoded speed increased by 30%. Here's the best results that i come out with: file : command.com (93,040 bytes) load : 2.56 mb/sec (n/a in original code) save : 3.39 mb/sec (n/a in original code) encode : 7.17 mb/sec (20% faster, original code runs at 6.05 mb/sec) decode : 7.31 mb/sec (30% faster, original code runs at 5.61 mb/sec) Here's the changes I've made : 1. *REWROTE* code clean up (i think it should be more readable) 2. *REWROTE* encode and decode table is created together. 3. *REWROTE* sub DECODE rewrote (should be faster). 4. *REWROTE* sub SPAN and UNSPAN now supports SpanSeparator. 5. *ADDED* More detailed co1mments for novice, not experts 6. *ADDED* some form controls, for input and output. 7. *ADDED* file loading and saving feature 8. *FIXED* encode / decode rate calculation fixed... more accurate should be 1 sec = 1024 ticks (kernel 1044 ticks?) and 1 mb = 1048576 bytes. (1024b x 1024b) and some other minor corrections as well...

C_Volume2 #72065
Command Line Functions

4 functions to handle command line options...example: yourprogy.exe -F, etc...one of them checks if a commandline option is in the command line....another one creates a commandline set with options...another one removes a specified option from the command line, and return the cmdline...(example: sometext -F, to sometext)...and the last one pulls out the text between 2 options in the commandline, and returns it...so -S blah -E would return just "blah"..can be very usefull...

C_Volume2 #72078
A Encryption/Decryption Program

This program encrypt or decrypt a text, with a key and a checksum checker. Very good program

C_Volume2 #72115
Effective Encryption Algorithm

Encrypts and decrypts strings

C_Volume2 #72187
Code Statistics

Get the statistics of your code. Find out exactly how many lines it is. It is easy to modify this project to include other file types etc.

C_Volume2 #72188
SQL Formatter

Formats SQL strings with quotes and line breaks for use in VB. This was a project that was submitted by another user that I have modified. I have added in the ability to update which SQL clauses will cause a line break, using a txt file. Also I have updated the SQLVarPos so that it uses an array for position location of key words. This also has better tab order and an auto-tab so you are ready to copy your formatted string as soon as you select "Format String".

C_Volume2 #72231
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.

C_Volume2 #72236
noresizeform

DUHH

C_Volume2 #72237
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.

C_Volume2 #72270
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.

C_Volume2 #72278
Find and Highlight Substring

' Given an editable textbox named Text1, this code prompts to find a word and ' searches throught the textbox and highlights the first occurance of the ' found word (if exists).

C_Volume2 #72279
Strip HTML tags

This following function takes an HTML page and strips it of all tags.

Languages
Top Categories
Global Discovery