Main > Free Download Search >

Free string software for linux

string

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 1537
gstring

gstring


The General String library was inspired by the Icon programming language string manipulation features. more>>
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
<<less
Download (0.054MB)
Added: 2005-09-27 License: GPL (GNU General Public License) Price:
1488 downloads
my_string 1.1

my_string 1.1


my_string is an easy-to-use, fast string manipulation library. more>>
my_string is an easy-to-use, fast string manipulation library. my_string is an incomplete port of PHP string manipulation functions to C.
Please note that this library is not binary safe. It was not written for binary data manipulation, just text string manipulation.
NOTE:
The resulting strings are statically allocated. The memory is freed and reallocated whenever the same function is called again.
BUGS:
There are no known bugs. If you do find any please let me know.
Enhancements:
- Fixed a memory allocation bug in str_Replace
<<less
Download (0.012MB)
Added: 2006-02-17 License: GPL (GNU General Public License) Price:
1344 downloads
String::MFN 1.27

String::MFN 1.27


String::MFN is a Perl module to Normalize a string in the manner of the mfn utility. more>>
String::MFN is a Perl module to Normalize a string in the manner of the mfn utility.

SYNOPSIS

use String::MFN;

my $sane_string = mfn($retarded_string);
...

Normalizes a string. Normalization, in brief, means modifying the string to resemble a sane UNIX filename while retaining information carried by the original formatting.
Normalization, in specific, consists of characters other than [w-.+] being removed, lowercasing of all letters, separation of internaCaps, separation of leading numerals from trailing non-numerals, replacement of "bracketing" characters ({[()]}), replacement of ampersands, and collapsing (things that look like) repeating extentions.

Some concrete examples (filenames found by googling for "mp3 playlist"):

Frank Sinatra & Count Basie - More.mp3
frank_sinatra_and_count_basie-more.mp3

Cornershop - Heavy Soup [Outro] [*] [*].mp3
cornershop-heavy_soup-outro.mp3

Soundtrack - American Pie 2 5 - Uncle Kracker - (Im Gonna) Split This Room In Half.mp3
soundtrack-american_pie_205-uncle_kracker-im_gonna-split_this_room_in_half.mp3

12. Only You (Bad Boys Remix)(Ft. The Notorious B.I.G.).mp3
12-only_you-bad_boys_remix-ft_the_notorious_b.i.g.mp3

Ultramagnetic MCs - Critical Beatdown.mp3.mp3.mp3
ultramagnetic_mcs-critical_beatdown.mp3

FUNCTIONS

mfn

Normalizes a string. Returns the normalized string. If no argument is given, mfn operates on $_.

<<less
Download (0.008MB)
Added: 2006-11-15 License: Perl Artistic License Price:
1073 downloads
Math::String 1.27

Math::String 1.27


Math::String module contains arbitrary sized integers having arbitrary charsets to calculate with key rooms. more>>
Math::String module contains arbitrary sized integers having arbitrary charsets to calculate with key rooms.

SYNOPSIS

use Math::String;
use Math::String::Charset;

$a = new Math::String cafebabe; # default a-z
$b = new Math::String deadbeef; # a-z
print $a + $b; # Math::String ""

$a = new Math::String aa; # default a-z
$b = $a;
$b++;
print "$b > $a" if ($b > $a); # prove that ++ makes it greater
$b--;
print "$b == $a" if ($b == $a); # and that ++ and -- are reverse

$d = Math::String->bzero( [0...9] ); # like Math::Bigint
$d += Math::String->new ( 9999, [ 0..9 ] );
# Math::String "9999"

print "$dn"; # string "00000n"
print $d->as_number(),"n"; # Math::BigInt "+11111"
print $d->last(5),"n"; # string "99999"
print $d->first(3),"n"; # string "111"
print $d->length(),"n"; # faster than length("$d");

$d = Math::String->new ( , Math::String::Charset->new ( {
minlen => 2, start => [ a..z ], } );

print $d->minlen(),"n"; # print 2
print ++$d,"n"; # print aa

<<less
Download (0.060MB)
Added: 2007-06-30 License: Perl Artistic License Price:
846 downloads
Strings edit 1.9

Strings edit 1.9


Strings edit is a library that provides I/O facilities for integer, floating-point, Roman numbers, and strings. more>>
Strings edit is a library that provides I/O facilities for integer, floating-point, Roman numbers, and strings. Both input and output subroutines support string pointers for consequent stream processing. The output can be aligned in a fixed size field with padding.
Numeric input can be checked against expected values range to be either saturated or to raise an exception. For floating-point output either relative or absolute output precision can be specified. UTF-8 encoded strings are supported.
Enhancements:
- GPS project files were added for GNAT users.
- A bug was fixed in Strings_Edit.Generic_Scale in which the caclculated precision was of the minor scale tick rather than of the major tick.
<<less
Download (0.053MB)
Added: 2007-05-20 License: GMGPL (GNAT Modified GPL) Price:
908 downloads
VSTRING 20050428

VSTRING 20050428


VSTRING is a C++ string manipulation library. more>>
VSTRING library provides vast set of string manipulation features including dynamic string object that can be freely exchanged with standard char* type, so there is no need to change function calls nor the implementation when you change from char* to String (and vice versa).

The main difference from other similar libs is that the dynamic String class has no visible methods (except operators) so you will use it as a plain char* but it will expand/shrink as needed.

VSTRING (VSTRLIB) also provides Perl-like arrays and hashes (VArray and VTrie). There is and VRegexp class which automates regexp pattern matching.

NOTE: vstring is loosely based on `cxstring lib (c) Ivo Baylov 1998.
NOTE: vstring is distributed standalone as well as a part from vslib.
<<less
Download (0.12MB)
Added: 2005-12-14 License: GPL (GNU General Public License) Price:
1409 downloads
Safe Strings 2.0.1

Safe Strings 2.0.1


Safe Strings is a small C library that handles C strings in a safe way. more>>
Safe Strings is a small C library that handles C strings in a safe way. The functions of this library look at the necessary space for the operations and try to reserve that space (with malloc or realloc).
Safe Stringss functions only begin working with their tasks when the memory allocation is successful.
The current release is the Version 1.0.4 and has more than 19 different functions. I added 4 functions that (I think) should be implented in the ANSI C Standard, but they are not.
Please note that the library doesnt contain only this 4 functions, they are more or less an example of what kind of function you will find here. The tarball contains under docs the man pages of all functions.
There are other functions implemented, but they are well explain in the documentation and manual pages.
Enhancements:
- This release moves towards the projects goal of ease of use.
- Instead of handling with double pointers (which increases the risk of setting allocated pointers to NULL, for example), this release creates a string object that contains information about the C string, like the length and the actual amount of allocated bytes for the string.
<<less
Download (0.29MB)
Added: 2006-11-14 License: GPL (GNU General Public License) Price:
1074 downloads
String::Scanf 0.98.8

String::Scanf 0.98.8


String::Scanf can emulate sscanf() of the C library. more>>
String::Scanf can emulate sscanf() of the C library.

SYNOPSIS

use String::Scanf; # imports sscanf()

($a, $b, $c, $d) = sscanf("%d+%d %f-%s", $input);
($e, $f, $g, $h) = sscanf("%x %o %s:%3c"); # input defaults to $_

$r = String::Scanf::format_to_re($f);
or
# works only for Perl 5.005
use String::Scanf qw(); # import nothing

my $s1 = String::Scanf->new("%d+%d %f-%s");
my $s2 = String::Scanf->new("%x %o %s:%3c");

($a, $b, $c, $d) = $s1->sscanf($input);
($e, $f, $g, $h) = $s2->sscanf(); # input defaults to $_

String::Scanf supports scanning strings for data using formats similar to the libc/stdio sscanf().

The supported sscanf() formats are as follows:

%d

Decimal integer, with optional plus or minus sign.

%u

Decimal unsigned integer, with optional plus sign.

%x
Hexadecimal unsigned integer, with optional "0x" or "0x" in front.

%o

Octal unsigned integer.

%e %f %g

(The [efg] work identically.)

Decimal floating point number, with optional plus or minus sign, in any of these formats:

1
1.
1.23
.23
1e45
1.e45
1.23e45
.23e45

The exponent has an optional plus or minus sign, and the e may also be E.

The various borderline cases like Inf and Nan are not recognized.

%s

A non-whitespace string.

%c

A string of characters. An array reference is returned containing the numerical values of the characters.

%%

A literal %.

The sscanf() formats [pnSC] are not supported.

The %s and %c have an optional maximum width, e.g. %4s, in which case at most so many characters are consumed (but fewer characters are also accecpted).

The numeric formats may also have such a width but it is ignored.

The numeric formats may have [hl before the main option, e.g. %hd, but since such widths have no meaning in Perl, they are ignored.

Non-format parts of the parameter string are matched literally (e.g. : matches as :), expect that any whitespace is matched as any whitespace (e.g. matches as s+).

<<less
Download (1.7MB)
Added: 2007-08-20 License: Perl Artistic License Price:
798 downloads
String::Tokenizer 0.05

String::Tokenizer 0.05


String::Tokenizer is a simple string tokenizer. more>>
String::Tokenizer is a simple string tokenizer.

SYNOPSIS

use String::Tokenizer;

# create the tokenizer and tokenize input
my $tokenizer = String::Tokenizer->new("((5+5) * 10)", +*());

# create tokenizer
my $tokenizer = String::Tokenizer->new();
# ... then tokenize the string
$tokenizer->tokenize("((5 + 5) - 10)", ());

# will print (, (, 5, +, 5, ), -, 10, )
print join ", " => $tokenizer->getTokens();

# create tokenizer which retains whitespace
my $st = String::Tokenizer->new(
this is a test with, (signifigant) whitespace,
,(),
String::Tokenizer->RETAIN_WHITESPACE
);

# this will print:
# this, , is, , a, , test, , with, , (, signifigant, ), , whitespace
print "" . (join ", " => $tokenizer->getTokens()) . "";

# get a token iterator
my $i = $tokenizer->iterator();
while ($i->hasNextToken()) {
my $next = $i->nextToken();
# peek ahead at the next token
my $look_ahead = $i->lookAheadToken();
# ...
# skip the next 2 tokens
$i->skipTokens(2);
# ...
# then backtrack 1 token
my $previous = $i->prevToken();
# ...
# get the current token
my $current = $i->currentToken();
# ...
}

A simple string tokenizer which takes a string and splits it on whitespace. It also optionally takes a string of characters to use as delimiters, and returns them with the token set as well. This allows for splitting the string in many different ways.

This is a very basic tokenizer, so more complex needs should be either addressed with a custom written tokenizer or post-processing of the output generated by this module. Basically, this will not fill everyones needs, but it spans a gap between simple split / /, $string and the other options that involve much larger and complex modules.

Also note that this is not a lexical analyser. Many people confuse tokenization with lexical analysis. A tokenizer mearly splits its input into specific chunks, a lexical analyzer classifies those chunks. Sometimes these two steps are combined, but not here.

<<less
Download (0.008MB)
Added: 2007-06-08 License: Perl Artistic License Price:
872 downloads
String::RexxParse 1.08

String::RexxParse 1.08


String::RexxParse is a Perl implementation of REXX parse command. more>>
String::RexxParse is a Perl implementation of REXX parse command.
SYNOPSIS
use String::RexxParse qw(parse);
parse $source, q! $var1 $var2 ( $var3 ) $var4 ($var5) $var6 !;
or
use String::PexxParse;
$parse = String::RexxParse->new(q! $var1 $var2 ( $var3 ) $var4 ($var5) $var6 !);
$parse->parse($source);
SYNTAX
parse EXPR, EXPR
The first EXPR is the source string to be parsed and must resolve to a scalar value.
The second EXPR is the template specification. The first time parse is called with a particular template, the template is compiled, then used to parse the source expression. Subsequent parse calls with the same template will use the previously compiled version of the template rather than compile the template again.
The template is specified as a single expression, usually using some single-quotish type of quoting, like q!...! for instance. The variable specifications, (or lvalue specifications) must not contain spaces. If you want data assigned to $qq{$one}, do not specify it as $qq{ $one } but as $qq{$one}. Although both are valid in Perl, only the latter is valid in a String::RexxParse template. Likewise, substr( $b , pos( $source ) , length( $match ) ) is NOT valid, but substr($b,pos($source),length($match)) is. Also, there must be white space following any lvalue specification (unless its the last item in the template). q/$b $c/ is OK, but q/$b$c/ is not.
If a variables value is to be used as a pattern, it is enclosed in parentheses.
Literal patterns are enclosed in either single or double quotes. Patterns can contain spaces within the quotes or parentheses.
A period (.) is used as a placeholder to skip part of the source string.
Numeric patterns (absolute or relative position) are supported. 3, =7, +5, -12, =($n), +($x), -($somenumber) are all numeric patterns (if you use variables inside parentheses preceeded by =, +, or -, make sure they contain numeric values). Remember that Perl starts counting position at zero, so absolute numeric patterns should be one less than in REXX to identify the same character position.
All Perl variables used must either be in the package that called parse, or they must be explicitly referenced with their package name (i.e., if parse is called from package Pack, $a implies $Pack::a -- if you want $a in package Sack, you must specify $Sack::a ). Lexical variables can not be used in the template. To assign values to lexical variables do somthing like this:
my ($b, $c, $d, $e) = parse $a, q! $x . $x ( $x ) $x !;
If youre concerned about the compiled templates taking up memory after youre done with them, you can add drop to the import list when you use String::RexxParse. Then pass the template to drop when youre done with it. Or just call String::RexxParse::drop($template). Or use the object oriented flavor discussed below.
Consult your favorite REXX manual for more details on templates.
$parse = String::RexxParse->new(EXPR);
$parse->parse(EXPR);
If you like, you can use String::RexxParse->new(EXPR) to create a String::RexxParse object. The EXPR passed to new is a template specification as described above. When you want to parse an EXPR, you just pass the string to the String::RexxParse object like so: $parse->parse(EXPR);
Enhancements:
- Fixed bug introduced in 1.07 and added j.t to test suite.
<<less
Download (0.009MB)
Added: 2007-06-29 License: Perl Artistic License Price:
847 downloads
String::Truncate 0.100

String::Truncate 0.100


String::Truncate is a Perl module for when strings are too long to be displayed in. more>>
String::Truncate is a Perl module for when strings are too long to be displayed in.

SYNOPSIS

This module handles the simple but common problem of long strings and finite terminal width. It can convert:

"this is your brain" -> "this is your ..."
or "...is your brain"
or "this is... brain"
or "... is your b..."
Its simple:
use String::Truncate qw(elide);

my $brain = "this is your brain";

elide($brain, 16); # first option
elide($brain, 16, { truncate => left }); # second option
elide($brain, 16, { truncate => middle }); # third option
elide($brain, 16, { truncate => ends }); # fourth option

String::Trunc::trunc($brain, 16); # => "this is your bra"

<<less
Download (0.006MB)
Added: 2006-10-23 License: Perl Artistic License Price:
1096 downloads
Math::String::Charset 1.27

Math::String::Charset 1.27


Math::String::Charset is a simple charset for Math::String objects. more>>
Math::String::Charset is a simple charset for Math::String objects.

SYNOPSIS

use Math::String::Charset;

$a = new Math::String::Charset; # default a-z
$b = new Math::String::Charset [a..z]; # same
$c = new Math::String::Charset
{ start => [a..z], sep => }; # with between chars

print $b->length(); # a-z => 26

# construct a charset from bigram table, and an initial set (containing
# valid start-characters)
# Note: After an a, either an b, c or a can follow, in this order
# After an d only an a can follow
$bi = new Math::String::Charset ( {
start => a..d,
bi => {
a => [ b, c, a ],
b => [ c, b ],
c => [ a, c ],
d => [ a, ],
q => [ ], # q will be automatically in end
}
end => [ a, b, ],
} );
print $bi->length(); # a,b => 2 (cross of end and start)
print scalar $bi->class(2); # count of combinations with 2 letters
# will be 3+2+2+1 => 8

$d = new Math::String::Charset ( { start => [a..z],
minlen => 2, maxlen => 4, } );

print $d->first(0),"n"; # undef, too short
print $d->first(1),"n"; # undef, to short
print $d->first(2),"n"; # aa

$d = new Math::String::Charset ( { start => [a..z] } );

print $d->first(0),"n"; #
print $d->first(1),"n"; # a
print $d->last(1),"n"; # z
print $d->first(2),"n"; # aa

This module lets you create an charset object, which is used to contruct Math::String objects. This object knows how to handle simple charsets as well as complex onex consisting of bi-grams (later tri and more).

In case of more complex charsets, a reference to a Math::String::Charset::Nested or Math::String::Charset::grouped will be returned.

The default charset is the set containing "abcdefghijklmnopqrstuvwxyz" (thus producing always lower case output).

<<less
Download (0.060MB)
Added: 2006-06-16 License: GPL (GNU General Public License) Price:
1226 downloads
Vstr string library 1.0.15

Vstr string library 1.0.15


Vstr is a safe and fast string library for C. more>>
Vstr is a safe and fast string library for C. Vstr string library is designed for network communication. Its design uses chunks of ptr+length data, so adding, substituting, and deleting data are all fast operations.
This model also allows it to do automatic referencing for mmap() areas of memory. Shortcut APIs are included to mmap() a file into a Vstr string, and read()/write() data to/from a Vstr string. Another big feature of the library is a POSIX and ISO 9899:1999 compliant printf() like function, which can also be extended with user supplied formatters that are gcc warning compatible.
The total API is over 280 functions, but laid out in a easy to remember manner, including data parsing functions, a non-destructive split() function, and conversion functions (among others).
Main features:
- a printf like function that is fully ISO 9899:1999 (C99) compliant, also having %m as standard and POSIX i18n parameter number modifiers. It also allows gcc warning compatible customer format specifiers (and includes pre-written custom format specifiers for ipv4 and ipv6 addresses, Vstr strings and more)
- splitting of strings into parameter/record chunks (a la perl).
- substituting data in a Vstr string
- moving data from one Vstr string to another (or within a Vstr string).
- comparing strings (without regard for case, or taking into account version information)
- searching for data in strings (with or without regard for case).
- counting spans of data in a string (the equivalent of strspn() in ISO C).
- converting data in a Vstr (Ie. delete/substitute unprintable characters or making a Vstr string lowercase/uppercase).
- parsing data from a Vstr string (Ie. numbers, or ipv4 addresses).
- easily parsing and wrapping outgoing data in netstrings, for fast and simple (and hence less error prone) network communication
- the ability to cache aspects of data about a Vstr string, to both simplify and speedup use of the string.
- the ability to have empty data as part of the string, this is somewhat useful for representing file transfers as a string as you can represent the file data as empty data in the string.
Enhancements:
- Bytemap functions were added to accelerate parsing.
- Custom formatters were sped up with a hash.
- Workarounds were added for a hidden Linux UIO 2GB limit and GCC 4.x symbol aliasing brain damage.
- Solaris build fixes were made along with a fix for a problem with loading zero-sized files with vstr_sc_*_file() and a couple of other minor problems.
<<less
Download (4.3MB)
Added: 2006-03-07 License: LGPL (GNU Lesser General Public License) Price:
1326 downloads
Better String Library 07222006

Better String Library 07222006


Better String Library is an abstraction of a string data type which is superior to the C library char buffer string. more>>
Better String Library is an abstraction of a string data type which is superior to the C library char buffer string type and C++s std::string.

The library is totally stand alone, portable (known to work with gcc/g++, MSVC++, Intel C++, WATCOM C/C++, Turbo C, Borland C++, IBMs native CC compiler on Windows, Linux and Mac OS X), high performance, easy to use and is not part of some other collection of data structures. Even the file I/O functions are totally abstracted (so that other stream-like mechanisms, like sockets, can be used.)

Nevertheless, it is adequate as a complete replacement of the C string library for string manipulation in any C program.

The library includes a robust C++ wrapper that uses overloaded operators, rich constructors, exceptions, stream I/O and STL to make the CBString struct a natural and powerful string abstraction with more functionality and higher performance than std::string.

Bstrlib is stable, well tested and suitable for any software production environment.
<<less
Download (0.11MB)
Added: 2006-08-24 License: BSD License Price:
1156 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5