Results for "Category: String Manipulation"
will search a listbox's contents for a string returning a True if the string exists and a False if it dosent
takes a string like "Johnny*(722)555-5555*35" and splits it into columns on a listview control(designed for Report view)
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.
This Code shows, how easy it is to store some dates in a mysql database
This Moves a Forms caption from left to right.
THIS VERY COOL FUNCTION TAKES A NORMAL STRING AND CONVERT EVERY CHARACTER IN IT FROM UCase TO LCase OR FROM LCase TO UCase... CHECK IT OUT!! AND VOTE IF YOU FIND IT USEFUL
I keep reading requests for RichtextBox code on PSC so I decided to upload one of my templates with a few added features. Nothing that special here really - basic RichtextBox functioality. The RichtextBox is pretty good at what it does though ! This example demonstrates : Find and Replace, Infinite Undo/Redo, Using .tmp files, HighLighting selected words, Inserting Images, Inserting text at a set location with different Fonts, Common Editing Functions, Shrinking a path to a desired length, Creating your own light-weight Wizard. This is not meant to be a complete application merely a demonstation of some techniques. All error messages and bugs are provided entirely free of charge. Feel free to use any of the code or errors as you wish - MS wrote the control - I've just shown how you might use it. It's capable of more than I've shown here.
Search a directory for files containing a specified string and return a list of such files. Once again, I've uploaded this in response to a quetion posted in the Discussion Forum.
Syntax coloring, advanced selection routines and Highlighting. Highlighting using the Richtextbox control is awkward. Whilst there are a host of Selection properties there is no Highlight property we can access from VB. We just have to parse the RTF code.
The Richtextbox is a great tool for displaying text but it can be quite a task converting it's format for use on the web. This project is part of a Code Library application that I still use today. It has HTML saving options for publishing source code to web sites. It demonstrates manipulation of the Richtextbox control, string parsing routines and syntax highlighting. It will also format your code applying standard indentation, remove blank lines and truncate long lines neatly, making your code much more readable. You can then choose to save it back to disk as a VB file(retaining it's original header), an HTML file or as a rich text file(rtf). Like all code this old, I would do many of the functions quite differently nowadays, but there are still some handy techniques used here. I hope I didn't create too many bugs when I pulled it out of my Code Library app ! I have had quite a few emails of late enquiring as to when I'll upload some more submissions, so in response to those here is yet another Bobo submission !
Provides a tutorial and applications for implementing a database update strategy utilizing the DataSet, DataAdapter and SqlServer.
This sifts through all the text in a RTF file and changes the colour of html tags. It can be used ewither automatically or on the fly (as you type into the RTF box). It currently Chnages the colour of html tags (defined as anything between "") and html comments (""). Enjoy! Please mail me with suggestions
With this application you can test the connection to a SQL server prior to adjusting your connectionstring of your application. It can attemp to connect by socket and by connecting to the database. Instead of the IP adress a hostname can be used. If connection is possible then the connectionstring is copied to the clipboard Upgraded the code and made some new functionality Thanks for the feedback
' 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.
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!
Tutorial to teach about LTrim, RTrim, Trim, Left, Right, Mid, StrReverse, creating your own stringreverse function, Replace, InStr, and simple text encryption. 2500 Word approx and examples included
This code should explain the bubble sort ! Bubble sort is a sort algorithm that sortes string in very fast way. There are many sort algorithms but this is the best !
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...
Swap Variable1 for Variable2 using API, this is usefull for creating data processing programs with many stored variables. See Info below
The code will take a passed string and a delimiter and parse the string into a variant array for reading. Works very well with csv files, etc.