Main > Free Download Search >

Free str software for linux

str

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 58
Str R107

Str R107


Str is a C++ class that is designed to make strings almost as easy to work with as they are in languages like TCL or Python. more>>
Str is a C++ class that is designed to make strings almost as easy to work with as they are in languages like TCL or Python.
The Str class has minimal outside dependencies, is implemented as a single source file, and is designed to be user-customized.
Str also makes it simple to allocate fast Stack-based strings with automatic overflow protection (when the stack buffer is exausted, buffer memory is automatically reallocated on the heap. Memory cleanup is automatic).
Enhancements:
- Benchmarking results were added to the documentation that compares Str, char*, and the standard C++ string class in typical string parsing operations.
- A STR() macro was added to simplify the creation of stack-based strings.
- The [] operator was changed to getChar() and putChar().
- This cleans up compiler warnings when using non-int types for index variables.
<<less
Download (0.25MB)
Added: 2007-05-06 License: BSD License Price:
901 downloads
OSSP str 0.9.12

OSSP str 0.9.12


OSSP str is a string library written in ISO-C which provides functions for handling, matching, parsing, etc of ISO-C strings. more>>
OSSP str is a generic string library written in ISO-C which provides functions for handling, matching, parsing, searching and formatting of ISO-C strings.
So it can be considered as a superset of POSIX string(3), but its main intention is to provide a more convenient and compact API plus a more generalized functionality.
Installation:
To install the Str library into /path/to/str/{bin,lib,include,man}/ perform the following steps in your shell:
./configure --prefix=/path/to/str
make
make test
make install
This installs at least a static variant of the Str library and when your platforms support it, also a shared library variant of the Str library.
Enhancements:
- str_parse(3) was fixed so that the va_list argument is no longer incorrectly used twice for processing the arguments, which led to segmentation faults.
<<less
Download (0.34MB)
Added: 2005-10-12 License: GPL (GNU General Public License) Price:
1472 downloads
Data::Str2Num 0.07

Data::Str2Num 0.07


Data::Str2Num - int str to int; float str to float, else undef. more>>
Data::Str2Num - int str to int; float str to float, else undef.

SYNOPSIS

#####
# Subroutine interface
#
use Data::Str2Num qw(config str2float str2int str2integer);

$float = str2float($string, [@options]);
(@strings, @floats) = str2float(@strings, [@options]);

$integer = $secspack->str2int($string);

$integer = str2integer($string, [@options]);
(@strings, @integers) = str2int(@strings, [@options]);


#####
# Class, Object interface
#
# For class interface, use Data::SecsPack instead of $self
#
use Data::Str2Num;

$str2num = Data::Str2Num;
$str2num = new Data::Str2Num;

$float = $secspack->str2float($string, [@options]);
(@strings, @floats) = $secspack->str2float(@strings, [@options]);

$integer = $secspack->str2int($string);

$integer = $secspack->str2integer($string, [@options])
(@strings, @integers) = $secspack->str2int(@strings, [@options]);

Generally, if a subroutine will process a list of options, @options, that subroutine will also process an array reference, @options, [@options], or hash reference, %options, {@options}. If a subroutine will process an array reference, @options, [@options], that subroutine will also process a hash reference, %options, {@options}. See the description for a subroutine for details and exceptions.

<<less
Download (0.055MB)
Added: 2007-02-15 License: Perl Artistic License Price:
981 downloads
Inline::Struct 0.06

Inline::Struct 0.06


Inline::Struct is a Perl module that manipulate C structures directly from Perl. more>>
Inline::Struct is a Perl module that manipulate C structures directly from Perl.

SYNOPSIS

use Inline C => Config => Structs => [Foo];

my $obj = Inline::Struct::Foo->new;
$obj->num(10);
$obj->str("Hello");

myfunc($obj);

__END__
__C__

struct Foo {
int num;
char *str;
};

void myfunc(Foo *f) {
printf("myfunc: num=%i, str=%sn", f->num, f->str);
}
This complete program prints:
myfunc: num=10, str=Hello

Inline::Struct is not a new language. Its a language extension designed to be used by Inline::C. It parses struct definitions and creates typemaps and XS code which bind each struct into a Perl class. This code is passed to Inline::C, which compiles it in the normal way.

NOTE: Inline::Struct parses only C-style structs. It doesnt know about any C++ extensions to structs like scopes, constructors or methods. If you want such functionality you should use Inline::CPP to parse your structs.

<<less
Download (0.008MB)
Added: 2006-07-06 License: Perl Artistic License Price:
1205 downloads
EasyTool 1.0.7

EasyTool 1.0.7


EasyTool is the library of Perl Functions in Common Usage. more>>
EasyTool is the library of Perl Functions in Common Usage.

SYNOPSIS

use EasyTool;

if(defined(&EasyTool::foo)){
print "lib is included";
}else{
print "lib is not included";
}

print EasyTool::is_int(2147483647); #true
print EasyTool::is_int(-2147483648); #true
print EasyTool::is_int(2147483648); #false

print EasyTool::is_id(4294967295); #true
print EasyTool::is_id(4294967296); #false

print EasyTool::is_email("xxx.abc@test.com"); #true

print EasyTool::trim(" t testn "); #test

print EasyTool::in(a, {a => 1, b => 2}); #true
print EasyTool::in(undef, 1, undef); #true

print EasyTool::ifnull(undef, 1); #1

print EasyTool::read_file("file.in");
print EasyTool::write_file("file.out", "string");
print EasyTool::append_file("file.out", "string");
print EasyTool::delete_file("file.out");

$ra_array = EasyTool::csv_2_array("a.csv");
print EasyTool::array_2_csv("a.csv", $ra_array);

print EasyTool::md5_hex("test"); #098f6bcd4621d373cade4e832627b4f6

print EasyTool::crc32("test"); #3632233996

$str = &EasyTool::encode_hex("hello");
print EasyTool::decode_hex($str); #hello

$str = &EasyTool::encode_base64("hello");
print EasyTool::decode_base64($str); #hello

$str = &EasyTool::url_encode(@^);
print EasyTool::url_decode($str); #@^

$str = &EasyTool::html_encode(";<<less
Download (0.025MB)
Added: 2007-08-11 License: Perl Artistic License Price:
806 downloads
Lisp::Fmt 0.01

Lisp::Fmt 0.01


Lisp::Fmt is a Perl module for Common Lisp like formatting. more>>
Lisp::Fmt is a Perl module for Common Lisp like formatting.

SYNOPSIS

use Lisp::Fmt;
$str = fmt("~{~a ~5,,,*a~}", $a,$b,$c,$d); # store result in $str
pfmt("~{ ~a~5,,,*a~}", $a,$b,$c,$d); # print to stdout

The Common Lisp "format" function provides an extremely rich set of formatting directives. This module brings this to Perl.

The formatting directives all begin with a ~ and take the form: ~[N]{,N}[@][:]X

where N is a number, X is a formatting directive, and @ and : are optional modifiers. Recognized directives are: A, S, W, D, O, B, X, R, C, P, T, ~, %, |, _, ?, *, n, {, }, (, ), [, ], , ^

examples:

C - simplest format spec, prints the arg
C - prints a number in base 10
C - prints a number in base 16
C - prints a number in base 12
C - prints a number in roman numerals
C<<less
Download (0.013MB)
Added: 2007-02-22 License: Perl Artistic License Price:
975 downloads
Sort::Key 1.28

Sort::Key 1.28


Sort::Key is the fastest way to sort anything in Perl. more>>
Sort::Key is the fastest way to sort anything in Perl.

SYNOPSIS

use Sort::Key qw(keysort nkeysort ikeysort);

@by_name = keysort { "$_->{surname} $_->{name}" } @people;

# sorting by a numeric key:
@by_age = nkeysort { $_->{age} } @people;

# sorting by a numeric integer key:
@by_sons = ikeysort { $_->{sons} } @people;

Sort::Key provides a set of functions to sort lists of values by some calculated key value.

It is faster (usually much faster) and uses less memory than other alternatives implemented around perl sort function (ST, GRT, etc.).

Multikey sorting functionality is also provided via the companion modules Sort::Key::Multi, Sort::Key::Maker and Sort::Key::Register.

FUNCTIONS

This module provides a large number of sorting subroutines but they are all variations off the keysort one:

@sorted = keysort { CALC_KEY($_) } @data

that is conceptually equivalent to

@sorted = sort { CALC_KEY($a) cmp CALC_KEY($b) } @data

and where CALC_KEY($_) can be any expresion to extract the key value from $_ (not only a subroutine call).

For instance, some variations are nkeysort that performs a numeric comparison, rkeysort that orders the data in descending order, ikeysort and ukeysort that are optimized versions of nkeysort that can be used when the keys are integers or unsigned integers respectively, etc.

Also, inplace versions of the sorters are provided. For instance

keysort_inplace { CALC_KEY($_) } @data

that is equivalent to

@data = keysort { CALC_KEY($_) } @data

but being (a bit) faster and using less memory.

The full list of subroutines that can be imported from this module follows:

keysort { CALC_KEY } @array

returns the elements on @array sorted by the key calculated applying { CALC_KEY } to them.

Inside { CALC_KEY }, the object is available as $_.

For example:

@a=({name=>john, surname=>smith}, {name=>paul, surname=>belvedere});
@by_name=keysort {$_->{name}} @a;

This function honours the use locale pragma.

nkeysort { CALC_KEY } @array

similar to keysort but compares the keys numerically instead of as strings.

This function honours the use integer pragma, i.e.:

use integer;
my @s=(2.4, 2.0, 1.6, 1.2, 0.8);
my @ns = nkeysort { $_ } @s;
print "@nsn"
prints
0.8 1.6 1.2 2.4 2

rnkeysort { CALC_KEY } @array
works as nkeysort, comparing keys in reverse (or descending) numerical order.
ikeysort { CALC_KEY } @array
works as keysort but compares the keys as integers (32 bits or more, no checking is performed for overflows).
rikeysort { CALC_KEY } @array
works as ikeysort, but in reverse (or descending) order.
ukeysort { CALC_KEY } @array
works as keysort but compares the keys as unsigned integers (32 bits or more).

For instance, it can be used to efficiently sort IP4 addresses:

my @data = qw(1.2.3.4 4.3.2.1 11.1.111.1 222.12.1.34
0.0.0.0 255.255.255.0) 127.0.0.1);

my @sorted = ukeysort {
my @a = split /./;
(((($a[0] name,
$_->middlename },
qw(str str str);

Sort::Key::register_type Color =>
sub { $_->R, $_->G, $_->B },
qw(int int int);

Once a datatype has been registered it can be used in the same way as types supported natively, even for defining new types, i.e.:

Sort::Key::register_type Family =>
sub { $_->man, $_->woman },
qw(Person Person);

<<less
Download (0.055MB)
Added: 2007-05-22 License: Perl Artistic License Price:
888 downloads
Math::Expr 0.2

Math::Expr 0.2


Math::Expr is a Perl module that parses mathematical expressions. more>>
Math::Expr is a Perl module that parses mathematical expressions.

SYNOPSIS

require Math::Expr;

$p=new Math::Expr;
$e=$p->Parse("a+4*b-d/log(s)+f(d,e)");

Parses mathematical expressions into a tree structure. The expressions may contain integers, real numbers, alphanumeric variable names, alphanumeric function names and most other characters might be used as operators. The operators can even be longer than one character! The only limitation is that a variable or function name may not start on a digit, and not all chars are accepted as operations. To be exact, here is the grammatic (in perl regexp notation):

< Expr > = -?< Elem >(< OpChr >< Elem >)*
< Elem > = < Number >|< Var >|< Function >|(< Expr >)
< Number > = < Integer >|< Float >
< Integer > = d+
< Float > = d*.d+
< Var > = [a-zA-Z][a-zA-Z0-9]*(:[a-zA-Z][a-zA-Z0-9]*)?
< Function > = [a-zA-Z][a-zA-Z0-9]*(< Expr >(,< Expr >)*)
< OpChr > = [^a-zA-Z0-9(),.:]+

If the - sign is present at the beginning of an < Expr > it is parsed in the exact same structure as 0< Expr >. That is to allow constructions like "-a*b" or "b+3*(-7)".

A variable consists of two parts separated by a :-char. The first part is the variable name, and the second optional part is its type. Default type is Real.

METHODS

$p = new Math::Expr

This is the constructor, it creates an object which later can be used to parse the strings.

$e=$p->Parse($str)

This will parse the string $str and return an expression tree, in the form of a Math::Expr::Opp object (or in simple cases only a Math::Expr::Var or Math::Expr::Num object).

$p->Priority({^=>50, /=>40, *=>30, -=>20, +=>10})

This will set the priority of ALL the operands (there is currently no way to change only one of them). The priority decides what should be constructed if several operands is listed without delimiters. Eg if a+b*c should be treated as (a+b)*c or a+(b*c). (Default is listed in header).

$p->SetOppDB($db)

Sets the OpperationDB to be used to $db. See Math::Expr::OpperationDB for more info. This will be passed down to all objects returned by the parser aswell.

<<less
Download (0.013MB)
Added: 2007-07-25 License: Perl Artistic License Price:
821 downloads
Simpy Tools 1.1

Simpy Tools 1.1


SimpyTools is a collection of various software for using and enhancing the simpy.com social bookmarking service. more>>
SimpyTools is a collection of various software for using and enhancing the simpy.com social bookmarking service.

Simpy Tools includes libraries in various programming languages for using the REST API of simpy.com. It also includes a Firefox extension and more.

Simple wrapper-lib for accessing the http://www.simpy.com/ REST API via python. See http://simpytools.sourceforge.net for details, and libs in other languages

Synopsis:

# get and store links in files matching a query
client = SimpyClient(user, passwd)
links = client.getLinks( {limit:20, q:+tags:"programming" +tags:"trails"} )
for i, link in enumerate(links):
s = urllib2.urlopen(link.url)
if s is not None: file(str(i)+".html", w+).write(s.read())
else: print "URL "+link.url+" was not handled"

Supported Calls:

GetTags, RemoveTag, RenameTag, MergeTags, SplitTag
GetLinks, SaveLink, DeleteLink
GetWatchlists, GetWatchlist
GetNotes, SaveNote

<<less
Download (0.017MB)
Added: 2007-04-19 License: The Apache License 2.0 Price:
918 downloads
Text::Roman 3.01

Text::Roman 3.01


Text::Roman is a Perl module that converts roman algarism in integer numbers and the contrary, recognize algarisms. more>>
Text::Roman is a Perl module that converts roman algarism in integer numbers and the contrary, recognize algarisms.

SYNOPSIS

use Text::Roman;

print roman(123);

Text::Roman::roman() is a very simple algarism converter. It converts a single integer (in arabic algarisms) at a time to its roman correspondent. The conventional roman numbers goes from 1 up to 3999. MROMANS (milhar romans) range is 1 up to 3999*1000+3999=4002999.

Up to these number we will found symbols as:??????but they do not concern this specific package. There is no concern for mix cases, like Xv, XiiI, as legal roman algarism numbers.

roman($int): return string containing the roman corresponding to the given integer, or if the integer is out of domain...

roman2int($str): return if $str is not roman or return integer if it is.

isroman($str): verify whether the given string is a conventional roman number, if it is return 1; if it is not return 0...

Quite same follows for mroman2int($str) and ismroman($str), except that these functions treat milhar romans.

<<less
Download (0.003MB)
Added: 2007-07-27 License: Perl Artistic License Price:
821 downloads
Python rope 0.6.1

Python rope 0.6.1


Python rope is a Python IDE. more>>
rope is a Python IDE. Python ropes main goal is to provide features like auto-completion, refactorings, content assistance, and outlines.

Refactoring: In recent years refactoring has become a basic task of everyday programing, specially in java community. In the agile programing methodologies, like Extreme Programing, Refactoring is one of the core practices.
Some IDEs support some basic refactorings like PyDev (which uses bicycle repair man). These IDEs have a limited set of refactorings and fail when doing refactorings that need to know the type of objects in the source code (specially for relatively large projects). rope tries to provide a rich set of refactorings. Some of the refactorings require type inferencing which is described later.
Auto Completion: One of the basic features of modern IDEs is the availability of auto-completion. Some Python IDEs have auto-completion support but in a limited form. Since the type of many variables cannot be deduced from simple analysis of the source code. Auto-completing modules names, class names, static methods, class methods, function names and variable names are easy. But auto-completing the methods and attributes of an object is hard. Because the IDE needs to know the type of the object that cannot be achieved easily most of the time in dynamic languages. rope uses Type Inferencing algorithms to solve this problem.
Type Inferencing: One disadvantage of dynamic languages like python is that you cannot know the type of variables by a simple analysis of program source code most of the time. Knowing the type of variables is very essential for providing many of the refactorings and auto-completions. rope will use type inferencing to overcome this problem.

Static type inferencing uses program source code to guess the type of objects. But type inferencing python programs is very hard. There have been some attempts though not very successful (examples: psycho: only str and int types, StarKiller: wasnt released and ShedSkin: good but limited). They where mostly directed at speeding up python programs by transforming its code to other typed languages rather than building IDEs. Such algorithms might be helpful.

There is another approach toward type inferencing. That is the analysis of running programs. This dynamic approach records the types variables are assigned to during the program execution. Although this approach is a lot easier to implement than the alternative, it is limited. Only the parts of the program that are executed are analyzed. If developers write unit tests and use test driven development this approach works very well.

<<less
Download (MB)
Added: 2007-08-20 License: GPL (GNU General Public License) Price:
797 downloads
Scalar::Util 1.19

Scalar::Util 1.19


Scalar::Util is a selection of general-utility scalar subroutines. more>>
Scalar::Util is a selection of general-utility scalar subroutines.

SYNOPSIS

use Scalar::Util qw(blessed dualvar isweak readonly refaddr reftype tainted
weaken isvstring looks_like_number set_prototype);

Scalar::Util contains a selection of subroutines that people have expressed would be nice to have in the perl core, but the usage would not really be high enough to warrant the use of a keyword, and the size so small such that being individual extensions would be wasteful.

By default Scalar::Util does not export any subroutines. The subroutines defined are

blessed EXPR

If EXPR evaluates to a blessed reference the name of the package that it is blessed into is returned. Otherwise undef is returned.

$scalar = "foo";
$class = blessed $scalar; # undef

$ref = [];
$class = blessed $ref; # undef

$obj = bless [], "Foo";
$class = blessed $obj; # "Foo"

dualvar NUM, STRING

Returns a scalar that has the value NUM in a numeric context and the value STRING in a string context.

$foo = dualvar 10, "Hello";
$num = $foo + 2; # 12
$str = $foo . " world"; # Hello world

isvstring EXPR

If EXPR is a scalar which was coded as a vstring the result is true.

$vs = v49.46.48;
$fmt = isvstring($vs) ? "%vd" : "%s"; #true
printf($fmt,$vs);

isweak EXPR

If EXPR is a scalar which is a weak reference the result is true.

$ref = $foo;
$weak = isweak($ref); # false
weaken($ref);
$weak = isweak($ref); # true

NOTE: Copying a weak reference creates a normal, strong, reference.

$copy = $ref;
$weak = isweak($ref); # false

looks_like_number EXPR

Returns true if perl thinks EXPR is a number. See "looks_like_number" in perlapi.

openhandle FH

Returns FH if FH may be used as a filehandle and is open, or FH is a tied handle. Otherwise undef is returned.

$fh = openhandle(*STDIN); # *STDIN
$fh = openhandle(*STDIN); # *STDIN
$fh = openhandle(*NOTOPEN); # undef
$fh = openhandle("scalar"); # undef

readonly SCALAR

Returns true if SCALAR is readonly.

sub foo { readonly($_[0]) }

$readonly = foo($bar); # false
$readonly = foo(0); # true

refaddr EXPR

If EXPR evaluates to a reference the internal memory address of the referenced value is returned. Otherwise undef is returned.

$addr = refaddr "string"; # undef
$addr = refaddr $var; # eg 12345678
$addr = refaddr []; # eg 23456784

$obj = bless {}, "Foo";
$addr = refaddr $obj; # eg 88123488

reftype EXPR

If EXPR evaluates to a reference the type of the variable referenced is returned. Otherwise undef is returned.

$type = reftype "string"; # undef
$type = reftype $var; # SCALAR
$type = reftype []; # ARRAY

$obj = bless {}, "Foo";
$type = reftype $obj; # HASH

set_prototype CODEREF, PROTOTYPE

Sets the prototype of the given function, or deletes it if PROTOTYPE is undef. Returns the CODEREF.

set_prototype &foo, $$;

tainted EXPR

Return true if the result of EXPR is tainted

$taint = tainted("constant"); # false
$taint = tainted($ENV{PWD}); # true if running under -T

weaken REF

REF will be turned into a weak reference. This means that it will not hold a reference count on the object it references. Also when the reference count on that object reaches zero, REF will be set to undef.

This is useful for keeping copies of references , but you dont want to prevent the object being DESTROY-ed at its usual time.

{
my $var;
$ref = $var;
weaken($ref); # Make $ref a weak reference
}
# $ref is now undef

Note that if you take a copy of a scalar with a weakened reference, the copy will be a strong reference.

my $var;
my $foo = $var;
weaken($foo); # Make $foo a weak reference
my $bar = $foo; # $bar is now a strong reference

This may be less obvious in other situations, such as grep(), for instance when grepping through a list of weakened references to objects that may have been destroyed already:

@object = grep { defined } @object;

This will indeed remove all references to destroyed objects, but the remaining references to objects will be strong, causing the remaining objects to never be destroyed because there is now always a strong reference to them in the @object array.

<<less
Download (0.042MB)
Added: 2007-05-21 License: Perl Artistic License Price:
888 downloads
DNS name parser 1.2.1

DNS name parser 1.2.1


DNS name parser is a Java utility library for parsing dns names, ip and hw addresses. more>>
DNS name parser is a Java utility library for parsing dns names, ip and hw addresses.

Synopsis

import su.netdb.parser.*;

Parser parser = new Parser();

Hashtable result = parser.parse(str);

System.out.println("string: "+result.get("string"));
System.out.println("hw: "+result.get("hw"));
System.out.println("name: "+result.get("name"));
System.out.println("domain: "+result.get("domain"));
System.out.println("ip_low: "+result.get("ip_low"));
System.out.println("ip_high: "+result.get("ip_high"));

"DNS name parser" is an utility library created to be used in a search application. Given a single input field its function is to differentiate between several types of possible input strings. Namely if it a dns name, IP address (exact, ip range or ip with wildcards) or hardware address. The result of the parsing is a Hashtable with possible keys "string", "hw", "name", "domain", "ip_low" and "ip_high".

<<less
Download (0.008MB)
Added: 2007-07-20 License: GPL (GNU General Public License) Price:
835 downloads
Newsd 1.44

Newsd 1.44


Newsd is a standalone local NNTP news server for private newsgroup serving on a single server. more>>
Newsd is a standalone local NNTP news server for private newsgroup serving on a single server.
It is useful for serving private newsgroup(s) to an intranet or the Internet and can act as a simple mail gateway, however it does not interface with other news servers and cannot manage distributed news feeds, i.e. Usenet news.
Newsd is available under the terms of the GNU General Public License. The Newsd source code should compile on any POSIX-compliant operating system. Binaries are provided for Linux and MacOS X.
Enhancements:
- Important fix to multiline headers being split during header reordering
- STR#15: Path: now maintained and passed through mail gateway
- STR#16: Mailgateway: "From" field now renamed to "X-Original-From:"
<<less
Download (0.10MB)
Added: 2005-10-20 License: GPL (GNU General Public License) Price:
1464 downloads
GINS 0.9.0

GINS 0.9.0


GINS is a way to add GTK interfaces to script languages that dont have any GTK bindings, like BASH scripts. more>>
GINS a.k.a. Gtk INterface for Script is a way to add GTK interfaces to scrpit languages that doesnt have any GTK bindigs, like BASH scripts. GINS load a GLADE xml file, using libglade. Then run the script, linking to his stdin & stdout.
Now script can communicate to GINS simply writting to stdin and reading from stdinput.
GINS pass to script every events that occours to gtk widgets, and script can react.
Enhancements:
- BradC: This version of GINS adds the ability to get boolean and double and the ability to set ints. So we can both get and set; int, str, double and boolean.
<<less
Download (0.014MB)
Added: 2007-03-09 License: GPL (GNU General Public License) Price:
964 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 4
  • 1
  • 2
  • 3
  • 4