Click here to Skip to main content

String handling

Great Reads

by Paul E. Bible
A Non-MFC String Class for use in ATL components
by Adam Nelson
Surveys other phonetic matching techniques, and presents additional resources on the subject.
by fabio bussu
MatchKit is a .NET Library that provides a set of classes to build patterns to match simple and complex strings
by Luc Pattyn
Way too much code. Using arrays of characters, your switch constructs can be reduced to just a few lines of code, like so:switch (c) { case 'a': sb.Append("4"); break; case 'e': sb.Append("3"); break; case 'i': sb.Append("1"); break; ...

Latest Articles

by Md Atiqur Rahman (Atique)
Tips and tricks on String manipulations in Unicode (Windows Programming context)
by John D. Cook
This article answers some of the first questions that come up when using regular expressions in C++ TR1
by John D. Cook
A script for extracting string literals from source code for review
by Psycho_Coder
Fuzzy String matching algorithms for Spell correction and string similarity matching using Edit Distance algortihms.

Discussions

by selvan from Chennai, Tamil Nadu on Parsing event log(*.evt) file
by Célio on More than strcmp(): similarity in strings
by Célio on More than strcmp(): similarity in strings
by Member 10997306 on article "C# Random String Generator"
by Tom Clement on Article "StringBuilderPlus Improves Upon...

All Articles

Sort by Updated

String - General 

4 Jul 2014
Md Atiqur Rahman (Atique)
Tips and tricks on String manipulations in Unicode (Windows Programming context)
26 Jun 2014
John D. Cook
A script for extracting string literals from source code for review
21 Apr 2014
fabio bussu
MatchKit is a .NET Library that provides a set of classes to build patterns to match simple and complex strings
5 Dec 2013
Prabu ram
Some commonly used operations with string in c# as extension methods
25 Nov 2013
S. M. Ahasan Habib
In this article I will demonstrate how to read a large CSV file chunk by chunk (line basis) and populate DataTable object and bulk insert to database.
6 Sep 2013
Ivan Yakimov
Here I describe several implementations of extended string.Format() methods.
19 Jul 2013
Ivan Yakimov
Here I describe how you can write your own implementation of string.Format method using slightly more readable syntax of format string.
4 Jun 2013
Avi Farah
Text document files can be enhanced by using construct and equivalent classes that "know" how to evaluate the constructs.
18 Apr 2013
brol.sergii
A C# class that can generate random strings and supports customisation.
2 Apr 2013
austinbox
How to structure the logic of a word search engine.
13 Mar 2013
Michael D Bray
Filling in text templates from a data source.
22 Jan 2013
lxdfigo
It is a lib that can process XML documents or JSON by changing a config file.
4 Jan 2013
Kerem Guemruekcue
How to reverese a string in C#/.NET with almost one line of code using a build in Windows library function which is available on any Windows system.
4 Dec 2012
sadomovalex
Shows how using reverse engineering feature developers may add new conditions into string CAML queries using lambda expressions.
27 Sep 2012
PJ Arends
This is an alternative for "MakeMessage - An STL 'replacement' for the FormatMessage API"
23 Sep 2012
DrABELL
Alternative solution that demonstrates performance improvement using String.Join() (extends original one:"StringBuilderPlus Improves Upon StringBuilder").
10 Aug 2012
Sympletech
A simple utility to help convert strings into other types
7 Jun 2012
Matt T Heffron
This is an alternative for "Word wrap without cutting words"
3 Jun 2012
Lee Robie
Simple extension methods that greatly simplify ToString, Logging, and Debug output.
18 May 2012
jfriedman
An article on string manipulation in the .NET Micro Framework.
14 May 2012
anlarke
Another take on the classic, now using SSE instructions
19 Apr 2012
Jani Giannoudis
Concepts and patterns for the handling of strings in multilingual applications.
16 Jan 2012
Jacek Gajek
Performing many replacements in a string at one time.
7 Dec 2011
Joe O'Leary
A Drop-In replacement for CString that builds on the Standard C++ Library's basic_string template
30 Jul 2011
George Mamaladze
Generate a word cloud form some input text. A word cloud is a randomly arranged set of words used in your text. The size and the color of each word expresses its usage frequency. Rarely used words are small and pale. The control is clickable and allows to identify a word under mouse.
24 Jul 2011
dotted_decimal
Custom formatting of String datatype in .NET based on intuitive formatting pattern
20 Jul 2011
SimmoTech
Helper class to build formatted strings and lists. Lots of features and very quick.
1 Jun 2011
AspDotNetDev
1 alternative  
StringBuilderPlus facilitates prefixing and suffixing strings and StringBuilderPluses in an efficient manner.
11 May 2011
SimmoTech
A useful class now twice as fast.
12 Feb 2011
csrss
This article describes creating and managing 1D, 2D and 3D string arrays
16 Dec 2010
Avi Farah
Allow for constructs within a string to be programmatically evaluated for a final string value
16 Aug 2010
Dima Popov
Create Rich Text Format documents programatically.
27 Jun 2010
Chris Boss
An advanced article about string processing
24 May 2010
Rui Figueiredo
A simple class to read EDI TRADACOMS Order 9.
31 Jan 2010
Serdar Altug
IBAN verification algorithm in C# and used in Excel UDF and Word SmartTag.
11 Jan 2010
Kubajzz
Should you use Regular Expressions, built-in .NET methods, or your own solution written from scratch?
24 Dec 2009
Ali Tarhini
String optimization methods and best practices in VB.NET.
5 Oct 2009
jlabrou
An opposite way to FileIO.TextFieldParser to easily write fixed-length fields into a text file.
30 Jul 2009
CrazyJugglerDrummer
Make a program that can perform various manipulations on a string.
16 Jul 2009
Kendall Miller
By implementing a single instance string store, you can significantly reduce the memory footprint of your application.
25 Jun 2009
Simon Tagg
This might save you 15 minutes and avoid the embarrasment of returning your 'sa' password to your customers along with an error message.
16 Jan 2009
PIEBALDconsult
Untabify and Tabify Extension Methods for intending code.
27 Nov 2008
Tomas Kubes
Several useful extensions for System.String.
12 Nov 2008
seeblunt
RichText Builder - use in place of StringBuilder to output RTF.
6 Nov 2008
osella.esteban
This article describes how to handle streams of non-English characters.
9 Jul 2008
Samjiman
Revise is a command line text editing tool
1 Jul 2008
BTDex
Class module to easily de-/compress and en-/decrypt big strings
15 Apr 2008
Peter Kankowski
Spelling messages like "5 file(s) found" correctly in any language
28 Dec 2007
Justin.Jones
An implementation of a Natural Sort Comparer
11 Dec 2007
Anders Eriksson
An extended CStringArray class
24 Oct 2007
Govardhana Reddy
This article will help you to find a way to convert RDF to RSS Feed format.
14 Sep 2007
Omer Tripp
An atricle introducing a StringBuilder class written in C++
7 Aug 2007
Hans Dietrich
XString offers functions for remove, replace, trim, and case-insensitive search that are not included in the CRT.
26 Jul 2007
Kiran Bheemarti
String enumerations for two way binding.
22 Jul 2007
M Shahid Shafiq
A simple function to perform wildcard ( * ? ) string matching
20 May 2007
rh_
How to convert safely STL strings between Unicode formats
16 May 2007
Hans Dietrich
XSearch implements a search engine-style advanced search, including ALL, EXACT PHRASE, AT LEAST ONE, and WITHOUT words. XSearch is based on a multiple-substring search algorithm.
3 May 2007
VaibhavGaikwad
Simple ways to parse CSV documents when values are embedded in double quotes.
25 Mar 2007
alex turner
Concatenating strings is critical in many dynamic content situations. Here is how to make it scale and then be fast and scale.
19 Mar 2007
Adam Nelson
Surveys other phonetic matching techniques, and presents additional resources on the subject.
19 Mar 2007
Adam Nelson
Introduces the Double Metaphone algorithm for phonetic comparison of proper names, and provides a practical C++ implementation for use in the reader's projects.
10 Mar 2007
Dileepa Jayathilaka
An article on the implementation of a dictionary where everything is kept in the disk as a B-Tree.
27 Feb 2007
Dileepa Jayathilaka
An article on a tool which unifies a string with a template consisting of variables and constants
19 Feb 2007
Ivo Beltchev
Smart string formatting and other string utilities
31 Jan 2007
Dennis Gourjii
A set of functions to perform the tasks that CString fails to address properly
5 Jan 2007
Nick Alexeev
A template string tokenizer class that works with both CStringArray and CStringList.
17 Nov 2006
John Simmons / outlaw programmer
A technique for making stdio functions compile clean regardless of the Microsoft compiler used
15 Oct 2006
Hadi Dayvary
KString class, a non MFC string class.
14 Sep 2006
getmayukh
This is an implementation of a text search tool, which can be used to index and search for texts within a collection of documents. The code is written in C# .NET and requires framework 1.1 to run. No third party search tool has been used, every bit of the algorithm has been implemented from scratch.
9 Aug 2006
Nitron
This article illustrates how to format a std::string using a variable argument list similar to CString's Format.
23 Apr 2006
QmQ
Yet another C# implementation of Java's StringTokenizer (in a ready to use library).
4 Mar 2006
PJ Arends
1 alternative  
A function that uses STL strings and streams in an effort to mimic and improve on the FormatMessage API.
11 Feb 2006
PJ Arends
Presents a header file that allows a single source file that uses STL to be built in either ANSI or Unicode, without any changes or lots of #ifdefs.
1 Feb 2006
Paul J. Weiss
A function that will split an input string based on a string delimiter.
3 Dec 2005
Roland Pibinger
Simplify string handling with a wrapper for std::string.
7 Nov 2005
Roland Pibinger
New style string class(es) for ASCII and UNICODE, single- and multi-threaded environments.
20 Oct 2005
darkoman
An article on an alternative for TextOut (ExtTextOut) function.
26 Sep 2005
Serge Wautier
Two classes that help you to easily load (and format) messages from the String table.
23 Sep 2005
rkaufman
Splitting CString objects is mostly easy, but can be tricky. I developed this function for using it with CSV files.
19 Sep 2005
Doga Arinir
A class to block the size of a given text.
5 Jun 2005
Olivier Lombart
An article about stack-allocated dynamic strings in C++.
2 May 2005
Parko
A simple class to encapsulate a file system path for easy manipulation.
29 Apr 2005
Andreas Muegge
A practical example how to use the Levenshtein algorithm for string matching
17 Mar 2005
Chris Losinger
CXR allows you to create encrypted strings at compile time.
5 Feb 2005
TomKat
String and String-List classes compatible with both ASCII and UNICODE strings.
3 Feb 2005
DarkYoda M
This article describes how to use wildcard to make input validation in CEdit control or to compare string with wildcard.
27 Dec 2004
Michael Jaworski
Article demonstrates a text-based Patricia trie and adds new text-compression features.
26 Dec 2004
Peter Kankowski
Optimizing string-manipulation functions.
14 Dec 2004
Hatem Mostafa
Fast string parsing in nested loops.
25 Nov 2004
Vsevolod
Standalone refcounted string class.
21 Sep 2004
Sashazur
Code for changing a string resource, that actually works!
12 Sep 2004
Rui A. Rebelo
A function which returns the similarity between two strings (how much they're equal).
12 Apr 2004
Rafid K. Abdullah
An article describing how to parse simple mathematical expressions (containing only +, -, *, /, and numbers) and evaluate their values.
7 Apr 2004
Doron Barak
Presenting a generic way to convert Array contents to Strings
6 Mar 2004
cMoXIV
Managing a textual numbering system for hashing words into numbers
4 Mar 2004
Chau Johnthan
An article on XML parsing using CString.
11 Dec 2003
AnOldGreenHorn
An extended string class for C++ programmers
20 Aug 2003
Kochise
CString based path splitter.
1 Jul 2003
soso_pub
MFC/non-MFC usage, UNICODE support, numerics operations support
20 May 2003
Hans Dietrich
XTrim implements _tcsltrim and _tcsrtrim - CRT-like functions to trim whitespace.
11 May 2003
Hans Dietrich
Extended string and memory search functions: memmem(), memimem(), memichr(), _tcsistr()
31 Aug 2002
Yap Chun Wei
A Class to Utilise Perl String Functions
29 Jun 2002
Oskar Wieland
CStringW and CStringA for WTL
26 Jun 2002
Daniel Andersson
A string tokenizer iterator class that works with std::string
12 Jun 2002
Marc Clifton
Simple extension for better substring functionality and numeric formatting
15 Mar 2002
Remon
Another class for extracting fields of string
14 Mar 2002
John Simmons / outlaw programmer
Parse strings with specified delimiter and specified quote character
12 Dec 2001
John Simmons / outlaw programmer
A small function to either accept or create a UUID* and return a CString
1 Nov 2001
Koundinya
User defined StringTokenizer
21 Oct 2001
Eddie Velasquez
A simple tokenizer class that can be used on CStrings
29 Sep 2001
Todd Jeffreys
Class that represents strings in a tier to enable faster lookups.
1 Sep 2001
Matt Gullett
A robust mechanism for sending CString objects to windows within the current process.
4 Nov 2000
Thomas Hauth
An MFC Class which offers you the abbility to check Strings for invalid characters
11 Aug 2000
Paul E. Bible
A Non-MFC String Class for use in ATL components
22 May 2000
Zoran M. Todorovic
Set of classes enabling UNICODE and ANSI string conversion.
17 May 2000
Joseph M. Newcomer
Learn how to effectively use CStrings.
26 Jan 2000
Dan Madden
A very simple string tokenizer class.
25 Jan 2000
Uwe Keim
Function to replace all occurences of a string within another, ignoring the case
1 Dec 1999
Ralph Walden
A function which doesn't require changing the case of the strings, and was also DBCS (double-byte character set) friendly.
Sort by Updated

String - General, 

12 Oct 2002
Michael Dunn, Nish Sivakumar
A guide to the string wrapper classes provided by Visual C++ and class libraries
4 Oct 2002
Michael Dunn
A guide to the multitude of string types used in Windows.
Sort by Updated

String - Regular Expressions 

26 Jun 2014
John D. Cook
This article answers some of the first questions that come up when using regular expressions in C++ TR1
1 Apr 2014
Farhad Alizadeh Noori
This article details the implementation of an efficient grouped regular expression searcher.
26 Aug 2013
Rion Williams
This post is going to cover a new library called RegExpBuilder which aims to transform very nasty looking regular expressions into easily readable formats that can easily be built and understood.
16 Jun 2013
Amit Bezalel
Using the power of regex to parse your logs
17 Jan 2013
Guirec
This article will introduce you with a set of 3 simple extension methods that can help you getting rid of Regex in many situations
22 May 2011
Pablo Osés
It aids you to develop and fully test your regular expression against a target text.
17 Nov 2009
Carl Johansen
Describes a free web-based utility for testing Regular Expressions and performing bulk text transformations.
14 Oct 2009
Daniel Killyevo
Gets all links that a page contains.
20 Aug 2009
PIEBALDconsult
Presenting a test bed for .NET Regular Expressions
1 Jul 2009
logicchild
An article that explains Regular Expressions
1 Jul 2009
spotofleopard
Regular Expressions enable your application to parse text files of customized formats.
24 Jun 2009
kdmitry
Provides administrators with a way to re-format biographical data from case-insensitive data-sources.
26 Sep 2008
Alex Perepletov
A convenient way to document the intent of each part of a regex.
7 Sep 2008
Stanislav Kniazev
Easy to use syntax highlighting class
6 May 2008
Pete O'Hanlon
A class to perform a "naive" comparison of two chunks of text to see if they look to be the same.
31 Jan 2008
Mike McCabe
A function to apply a regex replacement to a file.
19 Jun 2007
qazro
The article describes how to automate navigation through Web pages, i.e. send parameters and grab the required information automatically
16 Mar 2007
wjhu111
Derived currently supports RTF and HTML format
10 Jan 2007
Eugene Mirotin (Guard)
This article describes a class VarRegex allowing you to reuse parts of regular expressions
20 Oct 2006
kurt.griffiths
Handy Regex test utility for .NET helps you get the right expression to use in your code
18 Jun 2006
Sam NG
CATLRegExp - A Visual C++ built-in regular expression.
26 Apr 2006
Anil Choudary
Regular Expressions Usage with Examples
8 Sep 2005
Christopher Scholten
A simple Regular Expression Tester which allows one string to be tested against a standard regular expression, with feedback on the result in both text and graphical format as either the regular expression or the test string are typed.
15 Feb 2005
Jack Handy
Matches a string against a wildcard string such as "*.*" or "bl?h.*" etc. This is good for file globbing or to match hostmasks.
2 Jul 2003
Sunspot
A small, Unicode-aware regular expression engine based on Henry Spencer's early work
17 Jun 2002
perlmunger
A tutorial to demonstrate adding regular expressions to your project using Regex++ from boost.org.
25 Jan 2001
Sherwood Hu
how to use the Microsoft regular expression object in your C++ program
25 Jan 2001
Uwe Keim
Describes the theory behind regular expressions (RE) as well as the practical usage.
Sort by Updated

Strings 

10 Mar 2014
Dan Letecky
1 alternative  
Parsing PDF files in .NET using PDFBox and IKVM.NET (managed code).
22 Oct 2012
hatman70
This is an alternative for "Converting PDF to Text in C#"
8 Nov 2011
AbhishekGoenka
Use of SecureString class in .NET
1 Dec 2010
Scott Rippey
A string template method that allows you to fill a string with data. Easy to use, fast, extensible, and extremely powerful! Uses Reflection, Conditional Formatting, iterating through Arrays, and more!
28 Mar 2010
PIEBALDconsult
An improved string split method.
8 Feb 2010
Troy Simpson, Thanh Dao
Capturing the semantic similarity between two short sentences based on the WordNet dictionary.
11 Sep 2009
pat daburu
A quick and simple method for splitting up the lines in your .csv file.
8 Jul 2009
Nemanja Trifunovic
A simple, portable, and lightweight generic library for handling UTF-8 encoded strings.
13 Dec 2008
Steve Abraham
This article shows the reader how to construct a library of scalar and table valued functions for SQL Server 2005 to perform regular expression analysis.
16 May 2008
John Paul Pirau
Use CString to convert betwen UTF8 and UTF16.
30 Mar 2008
andrevdcolff
An alternative to native string and StringBuilder options
28 Mar 2008
zenox
This article will teach you how to use ANSI colors using .NET
16 Mar 2007
Eric Lynch
A class for removing or replacing non-printable Unicode characters.
7 Mar 2007
radumi
An article to demonstrate how to repair broken text.
27 Dec 2006
salysle
This article describes an approach to processing multiple command line arguments.
31 Oct 2006
Dominique Bijnens
A tool to quickly verify a sentence's correctness.
23 Oct 2006
Andrew Tweddle
Runs a console application and returns its output as a string. Useful for writing object-oriented wrappers around command line utilities, such as Subversion's svn utility.
28 Sep 2006
Alain Rist
Plug-in CodeProject's CStdString as WTL::CString and get the WTL CString support with a Standard C++ Library implementation.
23 Aug 2006
J a a n s
An article on parsing/opening event log files(*.evt) using c#
1 May 2006
mohsen ahmadian
This article describes a new Word Search Engine for your application or website.
23 Mar 2006
Marius Gheorghe
Learn more about Karmencita, an object query language for .NET.
17 Jan 2006
Werner.Reyneke
Library containing functions for XML Querying, Text Streaming, Debug Capture and LDAP.
20 Sep 2005
Anthony Johnston
Templating for text based formats.
27 Aug 2005
Hongwei Shen
A C# .NET implemntation of HTML text compare and merge engine based on a similar algorithm as the Unix diff.
8 Aug 2005
Paolo Gios
A .NET library for generating Word documents (.DOC) using the RTF (Rich Text Format) specification.
4 Jul 2005
Huisheng Chen
Find a fast way to replace case insenstive string.
15 Jun 2005
Marc Clifton
A small set of helper methods for string manipulation.
15 May 2005
Nish Sivakumar
A convertor class for managed-unmanaged string conversions that handles memory de-allocations. Caller need not worry about freeing unmanaged memory allocations.
26 Oct 2004
Ryan Seghers
A C# Library for tokenizing, argument parsing, and file finding.
24 Jun 2004
Ken Mackenzie
How to easily add line numbers to source code or text.
1 May 2004
Chester Ragel
An article on performance of String Vs StringBuilder and better places where each can be used
21 Oct 2003
Paul Welter
The NetSpell project is a spell checking engine written entirely in managed C# .NET code.
9 Mar 2003
Wee Ding
A user defined String Tokenizer (Java).
Sort by Updated

String - Text Conversion 

6 May 2014
Jeremy Falcon
Convert an integer to its textual description
17 Aug 2011
Alexander Bessonov
Introduces a fast and type-safe parameter rendering library (type-safe printf)
16 Dec 2010
Avi Farah
Overcoming limitations of: Enhanced String Handling
4 Dec 2010
Elmar de Groot
Convert strings to their strong typed counterpart with String.ConvertTo().
14 Jan 2010
Hanleyk1
A quick and easy solution to produce excellent HTML from RTF without parsing
15 Jun 2009
kdmitry
Implementation of IFormatProvider interface allowing to format "dirty-data" phone numbers into uniformed string
31 Mar 2009
James Mouchett
To format a string into currency without the dependency of VB6
19 Aug 2007
Le Sourcier
Converts a string to any format you want!!!
21 Sep 2006
Jeff Bogan
A class for longitude and latitude values so as to parse the string to render a double, or format a double into a string.
13 Jun 2006
Polymorpher
Convert ASCII text to binary and back.
12 Oct 2005
ImmelmanQ
An article on converting CStrings to chars without data loss.
19 Jun 2004
valdok
A simple tool that converts ANSI string to Unicode using a code page you select.
23 Feb 2004
Eloff
Benchmarks on various conversion technqiues, commentary, and some custom conversion functions.
22 Oct 2003
Robert Pittenger, MCPD-EAD
How to Encode and Decode Text to/from UTF-8
21 Aug 2003
Robert Pittenger, MCPD-EAD
An article on converting to/from C strings and various VB BSTR string types
4 Aug 2002
Nguyen Luong Son
A DLL to convert Float and datetime to Vietnamese textual string
25 Jun 2002
Hans Dietrich
An easy-to-use function that provides locale-correct comma-formatting of numbers
25 Jun 2001
Ryszard Krakowiak
Convert string using URLEncode method
13 Jun 2001
Anders Molin
An article on how to decode Base64 and Quoted-Printable text without using MFC.
15 Jan 2001
Anders Molin
Convert a string containing a hex value to an integer
Sort by Updated

String - Text Search and Replace 

23 May 2014
Psycho_Coder
Fuzzy String matching algorithms for Spell correction and string similarity matching using Edit Distance algortihms.
8 Sep 2013
Bojan Antolovic
A class similar to StringBuilder with a faster Replace function.
25 Apr 2010
Scot Brennecke
A string array class using MFC or STL that performs very fast multiple string searches
15 Jul 2008
julyhoping
This program is to search for words on text files.
25 Jan 2008
mi-chi
Tokenize and access string contents using a format mask
8 Jan 2008
Sivastyle
Library which contains code for replacing some of the Text in files based on conditions and handling the files by reading and writing strings from or to the file by recursively browsing the folder.
26 Nov 2007
Windmiller
A component that will find similar words in a lexicon as the user is writing on to make it easy to word-complete for the user. For use in Win32 graphical or console applications.
11 Jul 2007
Radu Gruian
This article introduces a template class-based approach to construct and query Patricia tries. The article includes source code and a demo application.
6 Apr 2007
Kishore Ramakrishnan
An article on using regular expressions to implement Find and Replace functionality
4 Aug 2005
Hans Dietrich
XTokenString extracts tokens from a string, and returns a CStringArray that contains tokens. A token is defined by specified delimiters; double-quotes may optionally group multiple words into a single token, and an option is provided for handling escaped characters.
1 Jul 2003
Kamal Shankar
An engine to allow you to search for strings in text files and replace them.


Advertise | Privacy | Mobile
Web01 | 2.8.140823.1 | Last Updated 25 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid