Extral Extra string manipulation commands

Home    Binary distributions    Source distribution    Documentation

string_split string splitstring
split string on exact occurence off splitstring

eg.:
	% string_split "test1||test2" "||"
	test1 test2
string_equal s1 s2
returns 1 if the strings are equal, 0 if the are not
string_fill string number
returns a string consisting of the argument string number times repeated
string_sounds string
This is an alteration of the soundex algorithm, some changes are: sz seperated from gkqc, c differs depending on next
string_change string changelist
change some parts of a string
changelist gives alternating a substring to be changed, and what it should be changed into. The command returns a string that is the given string where each occurence of the substrings in the changelist have been changed.
string_reverse list
returns the reverse of list.
string_find mode list pattern
returns a list of all indices which match a pattern. mode can be -exact, -glob, or -regexp The default mode is -exact
eg.:
	% string_find -regexp {Ape Ball Field {Antwerp city} Egg} {^A}
	0 16
string_replace string first last replacement
replace a part of a string
string_foreach varList string ?varList string ...? command
loop over the characters from a string, follows the same syntax as foreach for lists
Peter De Rijk
hosted at Get extral at SourceForge.net. Fast, secure and Free Open Source software downloads