gstring
Sponsored Links
gstring Ranking & Summary
File size:
0.054 MB
Platform:
Any Platform
License:
GPL (GNU General Public License)
Price:
Downloads:
1488
Date added:
2005-09-27
Publisher:
gstring Team
gstring description
The General String library was inspired by the Icon programming language string manipulation features. This library has a GNU license, i.e. it is free. I encourage you to get acquainted with the GNU license and support it if you agree with it.
Icon has two interesting features that are very useful in string manipulation:
Generators: A construct that can generate a sequence of values, and fails when no more values are available.
This is somewhat similar to Javas Iterator. This General String library supports generators through the IGenerator interface.
Backtracking: An operation can consist of two (or more) generators associated together, e.g. through an operator, if the second generator fails, we backtrack to the first generator and retry the operation again.
Think of a database transaction to help you understand backtracking, although they are different. This General String library supports backtracking through the operator classes in the gstring.operators package.
Next is a simple example to show the elegance of these concepts. Suppose that you want to parse a string to find the indexes of vowels:
GString source = new GString("Hello world"); // String to be parsed
SetChar target = new SetChar("aeiou"); // Vowels
IGenerator g = source.doGenerate().find().generator(target); // a find generator
Variant v; // a variant to hold generated positions
// loop until no more generations
do {
v= g.next(); // get next position
if (g.ok()) // if successful generation then print position
System.out.println(v);
} while (g.ok());
The above example will print:
1
4
7
Icon has two interesting features that are very useful in string manipulation:
Generators: A construct that can generate a sequence of values, and fails when no more values are available.
This is somewhat similar to Javas Iterator. This General String library supports generators through the IGenerator interface.
Backtracking: An operation can consist of two (or more) generators associated together, e.g. through an operator, if the second generator fails, we backtrack to the first generator and retry the operation again.
Think of a database transaction to help you understand backtracking, although they are different. This General String library supports backtracking through the operator classes in the gstring.operators package.
Next is a simple example to show the elegance of these concepts. Suppose that you want to parse a string to find the indexes of vowels:
GString source = new GString("Hello world"); // String to be parsed
SetChar target = new SetChar("aeiou"); // Vowels
IGenerator g = source.doGenerate().find().generator(target); // a find generator
Variant v; // a variant to hold generated positions
// loop until no more generations
do {
v= g.next(); // get next position
if (g.ok()) // if successful generation then print position
System.out.println(v);
} while (g.ok());
The above example will print:
1
4
7
gstring Screenshot
gstring Keywords
General String
Icon programming language
string library
String manipulation
programming language
Inspired By
Icon Programming
string
gstring
library
general
features
icon
gstring
Libraries
Programming
Bookmark gstring
gstring Copyright
WareSeeker periodically updates pricing and software information of gstring full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of gstring Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
history of icon programming language
the icon programming language
c++ string library
bowtech general string
icon programming languages
general stringer
string library c++
string bikini
string library c
query string
string trimmers
general stringham
string library in c
string library functions
icon programming language multiple
g string wax
string theory
programming language guide
Version History
Related Software
my_string is an easy-to-use, fast string manipulation library. Free Download
VSTRING is a C++ string manipulation library. Free Download
YASTR is a simple string library that mainly consists of functionality that I require in my programs. Free Download
Vstr is a safe and fast string library for C. Free Download
Better String Library is an abstraction of a string data type which is superior to the C library char buffer string. Free Download
FScript is a very simple embedded scripting language for Java. Free Download
Tango is a cross-platform open-source software library, written in D for D programmers. Free Download
Tom is a software environment for defining transformations in Java. Free Download
Latest Software
Popular Software
Favourite Software