6e7b8bdf6aeb604219a24f35cf1d303a0cb6edef kent Wed Aug 7 18:08:33 2019 -0700 Librarifying strex string expression module that is going in for tabToTabDir to help sort through some of HCA madness. diff --git src/lib/strex.doc src/lib/strex.doc new file mode 100644 index 0000000..cb69300 --- /dev/null +++ src/lib/strex.doc @@ -0,0 +1,19 @@ +The strex language is a small string expression evaluation language. +This document describes its built in functions: + +between(prefix, string, suffix) - returns the part of string found between prefix and suffix + example: between("abc", "01234abcHelloxyz56789", "xyz") fetches just "Hello" + If there are multiple places the prefix occurs, it will choose the first one, and the + then the first place the suffix matches after that. The biologist might think of it as + a text oriented PCR, though the primer prefix and suffixes are not included in the output. + +split(string, splitter, index) - separates string with splitter character. Returns 0 based index. + +spaced(string, index) - treats string as space separated, and returns word of given 0 based index + +trim(string) - returns copy of string with leading and trailing spaces removed + +md5(string) - returns an MD5 sum digest/hash of string. Useful for creating IDs + +now() - returns current time and date in a really aweful unix ctime(2) format. We will improve it. +