Browse DevX
Sign up for e-mail newsletters from DevX

Search the Tips
Tip Bank > Visual Basic > String Manipulation

String Manipulation - Page 2

21-40 of 50     Previous     Next
Use the XSLT 2.0 Character-map Element to Replace Characters
by Leonard Anghel
Here's an example of how to use XSLT 2.0's new character-map element to replace a character (or group of characters) with another character (or group of characters) on the transformation runtime.
An Improved szEncryptDecrypt VB6 Funtion
by Scott Likely
The szEncryptDecrypt function in a previous tip did not handle unicode strings properly, but otherwise worked well. The changes in the following version should work for any string by explicitly converting each character to ASCII and back.
Converting an Integer to a C++ String
by Jon Sumners
Boost libraries provide a better way to convert numbers into strings or vice versa.
Using the SecureString Class
by Srinath MS
NET 2.0's System.Security namespace includes the SecureString class, which lets you create encrypted strings and delete them from memory when they're no longer needed.
Another Way to Escape Sequences in .NET Resource Files
by Nick Piazza
There is actually another way to insert escape sequences, such as newline characters—or actually any Unicode character, directly into the Resource string—without resorting to Replace or similar manipulations.
Avoid Memory Corruption when Assigning a CComBSTR to a CComVariant's bstrVal Member
by Alison Lomaka
Although the CComBSTR = operator is overloaded to make a copy of the string, this is not the case when assigning a CComVariant's bstrVal member to a CComBSTR.
Workaround for the SQL DISTINCT Clause
by Srinath MS
The SQL DISTINCT clause isn't case sensitive, which means that your query might end up pulling records with different cases.
Use String.Compare to Compare Case-insensitive Strings
by Srinath MS
Find out how to use the String.Compare function to perform a case-insensitive string comparison.
Clear All Occurences of Extra White Space
by Sameer Palande
This function clears all occurences of extra white space (spaces, tabs, blank lines) and programming comments beginning with ';' in a file and saves the cleaned file as another file.
Iterate Through Characters in a String Using String.ToCharArray
by Harish Lalwani
Learn how to use String.ToCharArray to iterate easily through a string.
Replace All Occurences of Numbers in the Input String
by Sameer Palande
This function replaces all occurences of numbers in the input string with '#' and returns the replaced string.
Object Functions in Use
by Arman Sahakyan
You can use an object function to find the first occurence of a string started by a given symbol in a vector.
Using Multiline Strings in .NET Resource Files
by Guy Ronen
Displaying strings from .NET resource files may be a puzzle if the strings include escape sequences. Here is an easy solution.
Count the Number of Cells Containing a Specified String in a Worksheet
by Alistair Evans
Simply insert this function into a module to count the number of cells with a specified string in a worksheet.
Read the First Line of a Text File
by Leonard Anghel
This code shows you how to use the instance methods from the FileReader and BufferedReader classes with a Xalan 2 processor to read the first line from a text file.
Read and Write Strings Using String Streams
by Kevin Spiteri
String streams allow reading and writing strings just like cin and cout allow reading standard input and writing standard output.
Platform-independent New Line Characters
by MS Sridhar
Java provides a handle with which you can retrieve the specific new line character for the type of operating system you're working on.
Creating a StAX Filter for XML
by Leonard Anghel
This tip creates a StAX filter using the javax.xml.stream.StreamFilter interface.
Escape Sequences in .NET Resource Files
by Boris Eligulashvili
Learn how to escape sequences in .NET resource files.
Reverse a Numeric Value Without Using String Utilities in Java
by Elayaraja David
Find out how to use the NumberReverse to reverse a given number without using string utilities.
21-40 of 50     Previous     Next
Thanks for your registration, follow us on our social networks to keep up-to-date