The Script Plus Plus library homepage

The Script Plus Plus library (a.k.a. ScriptPP) is a collection of C++ classes to do the things you usually do in so-called scripting languages such as Perl, Tcl, Bash etc. The main class is named ScriptVariable and it seems to be a good replacement for the standard string class. Why to replace it? At least because it doesn't provide no operations of tokenization, breaking a string down to words, and conversion to integers and floats - the things which I need tens of times more often that, heh, replacing a region etc... ScriptVariable does all these things, and, BTW, it also allows to replace and/or erase substrings if you want, but it does that with more object-oriented style (a range is a slave object, and it has Erase and Replace methods). Needless to say that concatenation with operator+ and operator+= is also available ;-)

The library also includes the ScriptVector class which implements a dynamically resized vector of strings; this is what you get when you break your string down to words or tokens.

Besides that, there are sets of strings (the ScriptSet class) and maps of string to string (the ScriptMap class), implemented as hash tables. Furthermore, the library support variable substitutions in strings (like %myvar%, %[my%var%] etc.), using ScriptSubstitution class.

Strings are not only objects handled by the library. It includes the cmd module which provides facilities to read (and analyse) streams, execute external programs and to restore your terminal mode in case the external program spoils it.

No other libraries are needed to use ScriptPP. Nothing but the C standard library is used by the code (these strcmp, strcpy etc). No STL, and certainly no string class. Heh, personally I just hate STL. C++ is nice (if we don't pay attentions to all these so called 'standards' created by specially dangerous international terrorists called a standard commitee). STL is a bad monster.

The library is available under the terms and conditions of GNU Lesser General Public License, v. 2.1.

The last version is 0.3.10 and it is available for downloading in the form of source tarball here via ftp and here via http.

This is still a pre-beta version. Please don't expect too much. I'm really sorry that, as for now, I've got no documentation for the library. I hope to add it later, and for now just take a look at the header files and the tests (scrtest.cpp).

C++ libraries at Croco.Net

Valid HTML 3.2!

The page changed March 05, 2019