Skip to content

noporpoise/strtools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

strtools - command line utilities for string functions

== build ==

1) To build:

$ make

2) To add a softlink to the executable

ln -s PATH/TO/strtools ~/bin/strtools
ln -s PATH/TO/uc ~/bin/uc
ln -s PATH/TO/lc ~/bin/lc

Or add the directory to your ~/.profile:

export PATH=$(PATH):PATH/TO/STRTOOLS/


== Run ==

## strlen ##

$ strlen asdfasdfasdf as
8
2
$ strlen "as d"
4
$ echo "hi
bye" | strlen
2
3


## uc ##
$ uc asdfasdfasdf as
ASDFASDFASDF
AS
$ uc "as d"
AS D
$ echo "hi
> bye" | uc
HI
BYE


## lc ##
$ lc ASDFASDFasdf aS
asdfasdfasdf
as
$ lc "aS D.2"
as d.2
$ echo "Hi
> BYE?" | lc
hi
bye?
$


## char2ascii ##
$ ./char2ascii asdf
97
115
100
102
$


## ascii2char ##
$ ./ascii2char 98 99 100
b
c
d
$


## strcmp ##
$ ./strcmp asdf asdF
32
$ ./strcmp asdf asdf
0
$


## strcasecmp ##
$ ./strcasecmp asdf asdF
0
$ ./strcasecmp asdf qwer
-16
$ 

## strrev ##
$ ./strrev asdf df
fdsa
fd

== More ==

 project: strtools
 url: http://sourceforge.net/projects/strlen/
 author: Isaac Turner <turner.isaac@gmail.com>
 license: GPLv3
 copyright (C) 27-Jan-2012

Please get in touch with bug reports or request features,

Isaac

== Coming soon ==

int isalnum(int c) -- True if c is alphanumeric. 
int isalpha(int c) -- True if c is a letter. 
int isascii(int c) -- True if c is ASCII . 
int iscntrl(int c) -- True if c is a control character. 
int isdigit(int c) -- True if c is a decimal digit 
int isgraph(int c) -- True if c is a graphical character. 
int islower(int c) -- True if c is a lowercase letter 
int isprint(int c) -- True if c is a printable character 
int ispunct (int c) -- True if c is a punctuation character. 
int isspace(int c) -- True if c is a space character. 
int isupper(int c) -- True if c is an uppercase letter. 
int isxdigit(int c) -- True if c is a hexadecimal digit

About

Small command line tools for manipulating strings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages