Results for "Category: String Manipulation"
This example will show you how parse a list a variables quickly with minimal coding.
k so i was bored so sue me! neway i made this as a joke for when im on the irc or something i dunno its not perfect, but dont expect ne updates if you want anything diff. do it yourself i think it would be really fun to add this to an irc client , so that as you type it changes it. easily done just change the stuff in the button to text1_change and it should work
This code will cycle through a text box or rich text box line by line, select the line and place it into a string array. The array will then be passed to another method where it will be placed into a list box excluding the blank lines. I've seen other code like this but if there is no ending vbCrLf then the last line of the box is not read, I've fixed this and showed how to extract the line information and how to use it. The code is slowed down using a pause routine that I made about a year ago.
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...
I know there is the replace(text1.text,"Jack","Jill") in VB6 which would find all the words Jack and replace them with Jill in text1, but how can I do this in VB5? I want to be able to put symbols in general sentences, and replace the symbols with specific data. such as: Thats a great pass from #! He passes to # who sets up a shot!
The code generates a random name. I am giving basically two simple functions with which you can create a loop that will make many thousands of nicknames or names for roleplay games. Check it out.
Update of my scripting engine Now supports if/elseif/else, while loops, loop loops, arrays of variables, formula evaluation (i got the code from here, but cant remember from who, but ill find and give them credit, i promise, sorry to that person). All of the above can be nested, along with the functions. You can EASILY add very little code to make it open a console window and do input and output. I didn't add that because it's purely an engine so far.
Converts IRC text to RTF and displays it in a RichText Box. Supports everything.
Strings play an important role in every software. This tutorial is big, it has everything that a beginner wants. This version is modified to remove some mistakes in the previous one, and adds some information about instr. I'd be glad to see your feedback. Thanks! Note: Since I am no guru, this could be all wrong, use it at your own risk.
This is a InStrRev function for VB5. I took a look at the one microsoft recomend, and almost died of laughter.
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.
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!
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!
Encrypts and decrypts strings
This takes a jumbled word and compares it to a list of words (apprx 110,000 words) that are commonly used in crossword puzzles and such. I got this paticualr idea from Robert Rayment's code on finding anagrams for a word. You can also replace the provided word list with a bigger one. please give all feedback positive and negative. Thanks, and vote
Lots of different function for handling VB strings. Take a look inside, you mightlike what you see...
This small script simply and easly creates an AutoComplete affect for your ComboBox. VERY EFFECTIVE AND VERY EASY TO UNDERSTAND.
This is a class that allows coloring VB text. Could be modified to do the same for other languages. It is in a sample project that demonstrates its use. It needs some further work to resolve parentheses situations. The ideas of many PSC authors are used here. Please post improvements you make to this code. Have fun!
This code will truncate specified text with ellipses. It is very usefull for displaying long strings in textboxes and title bars. It will even truncate a pathname similar to windows.
Explores and teaches parsing algorithm techniques (PART 1)