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 T Manjaly
This post shows sample code to scramble a word using C# string object
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

Discussions

by Rohan Leuva on article "Sample Code to Scramble a Word using...
by PIEBALDconsult on article "Sample Code to Scramble a Word using...
by Prerak Patel on article "Sample Code to Scramble a Word using...
by Prerak Patel on article "Sample Code to Scramble a Word using...
by alejandro29A on article "Sample Code to Scramble a Word using...

All Articles

Sort by Score

String - General 

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

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 Score

String - Regular Expressions 

1 Jul 2009
spotofleopard
Regular Expressions enable your application to parse text files of customized formats.
16 Jun 2013
Amit Bezalel
Using the power of regex to parse your logs
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.
22 May 2011
Pablo Osés
It aids you to develop and fully test your regular expression against a target text.
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
25 Jan 2001
Uwe Keim
Describes the theory behind regular expressions (RE) as well as the practical usage.
18 Jun 2006
Sam NG
CATLRegExp - A Visual C++ built-in regular expression.
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
17 Jun 2002
perlmunger
A tutorial to demonstrate adding regular expressions to your project using Regex++ from boost.org.
14 Oct 2009
Daniel Killyevo
Gets all links that a page contains.
20 Aug 2009
PIEBALDconsult
Presenting a test bed for .NET Regular Expressions
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.
26 Jun 2014
John D. Cook
This article answers some of the first questions that come up when using regular expressions in C++ TR1
7 Sep 2008
Stanislav Kniazev
Easy to use syntax highlighting class
1 Jul 2009
logicchild
An article that explains Regular Expressions
20 Oct 2006
kurt.griffiths
Handy Regex test utility for .NET helps you get the right expression to use in your code
10 Jan 2007
Eugene Mirotin (Guard)
This article describes a class VarRegex allowing you to reuse parts of regular expressions
25 Jan 2001
Sherwood Hu
how to use the Microsoft regular expression object in your C++ program
17 Nov 2009
Carl Johansen
Describes a free web-based utility for testing Regular Expressions and performing bulk text transformations.
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.
19 Jun 2007
qazro
The article describes how to automate navigation through Web pages, i.e. send parameters and grab the required information automatically
24 Jun 2009
kdmitry
Provides administrators with a way to re-format biographical data from case-insensitive data-sources.
26 Apr 2006
Anil Choudary
Regular Expressions Usage with Examples
16 Mar 2007
wjhu111
Derived currently supports RTF and HTML format
26 Sep 2008
Alex Perepletov
A convenient way to document the intent of each part of a regex.
31 Jan 2008
Mike McCabe
A function to apply a regex replacement to a file.
Sort by Score

Strings 

8 Feb 2010
Troy Simpson, Thanh Dao
Capturing the semantic similarity between two short sentences based on the WordNet dictionary.
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.
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.
28 Mar 2010
PIEBALDconsult
An improved string split method.
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!
8 Jul 2009
Nemanja Trifunovic
A simple, portable, and lightweight generic library for handling UTF-8 encoded strings.
21 Oct 2003
Paul Welter
The NetSpell project is a spell checking engine written entirely in managed C# .NET code.
4 Jul 2005
Huisheng Chen
Find a fast way to replace case insenstive string.
8 Aug 2005
Paolo Gios
A .NET library for generating Word documents (.DOC) using the RTF (Rich Text Format) specification.
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.
10 Mar 2014
Dan Letecky
1 alternative  
Parsing PDF files in .NET using PDFBox and IKVM.NET (managed code).
16 Mar 2007
Eric Lynch
A class for removing or replacing non-printable Unicode characters.
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.
23 Aug 2006
J a a n s
An article on parsing/opening event log files(*.evt) using c#
26 Oct 2004
Ryan Seghers
A C# Library for tokenizing, argument parsing, and file finding.
30 Mar 2008
andrevdcolff
An alternative to native string and StringBuilder options
23 Mar 2006
Marius Gheorghe
Learn more about Karmencita, an object query language for .NET.
15 Jun 2005
Marc Clifton
A small set of helper methods for string manipulation.
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.
8 Nov 2011
AbhishekGoenka
Use of SecureString class in .NET
22 Oct 2012
hatman70
This is an alternative for "Converting PDF to Text in C#"
20 Sep 2005
Anthony Johnston
Templating for text based formats.
17 Jan 2006
Werner.Reyneke
Library containing functions for XML Querying, Text Streaming, Debug Capture and LDAP.
7 Mar 2007
radumi
An article to demonstrate how to repair broken text.
16 May 2008
John Paul Pirau
Use CString to convert betwen UTF8 and UTF16.
24 Jun 2004
Ken Mackenzie
How to easily add line numbers to source code or text.
31 Oct 2006
Dominique Bijnens
A tool to quickly verify a sentence's correctness.
1 May 2004
Chester Ragel
An article on performance of String Vs StringBuilder and better places where each can be used
1 May 2006
mohsen ahmadian
This article describes a new Word Search Engine for your application or website.
27 Dec 2006
salysle
This article describes an approach to processing multiple command line arguments.
11 Sep 2009
pat daburu
A quick and simple method for splitting up the lines in your .csv file.
28 Mar 2008
zenox
This article will teach you how to use ANSI colors using .NET
9 Mar 2003
Wee Ding
A user defined String Tokenizer (Java).
Sort by Score

String - Text Conversion 

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

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.
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.
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.
25 Apr 2010
Scot Brennecke
A string array class using MFC or STL that performs very fast multiple string searches
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.
6 Apr 2007
Kishore Ramakrishnan
An article on using regular expressions to implement Find and Replace functionality
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.
25 Jan 2008
mi-chi
Tokenize and access string contents using a format mask
1 Jul 2003
Kamal Shankar
An engine to allow you to search for strings in text files and replace them.
15 Jul 2008
julyhoping
This program is to search for words on text files.


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 20 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid