The functions of the Eval library: (the examples use the abbreviated/simplified name - both are equivalent) ------------------------------------------------------------------------------- str_cont( haystack, needle) return the bool value of the string containment (0/1) strcont('alfa beta gamma', 'a b') --> 1 There exists the '[]=' operator, which is equivalent to this function (and similarly does the '[]!=', which is the non-containment operator). The previous example can be written in the following (shorter) form, too: 'alfa beta gamma' []= 'a b' --> 1 ------------------------------------------------------------------------------- str_pos( haystack, needle) find a string in an other one, the result is the position of the needle, -1 if not found strpos('fatal fruit: apple in the eden', 'apple') --> 12 ------------------------------------------------------------------------------- str_tok( s, separator, token_index) extract the given token strtok('alfa|beta|gamma|delta', '|', 2) --> 'gamma' ------------------------------------------------------------------------------- strntok( s, separator, token_index) extract the tokens except the indexed one (everything, except 'token_index') ------------------------------------------------------------------------------- strmtok( s, separator, index1, index2, ... index_n) extract the given tokens from the input string strmtok('alfa beta gamma delta', ' ' 0, 2, 3) --> 'alfa gamma delta' ------------------------------------------------------------------------------- tokenize( s, separator, > tokens) tokenize the 's' similarly to the previous one. The results are stored in 'tokens'. If the array item type is not string, the tokens are transformed to its value (f.e. number tokens can parsed into int values). The resulting value is the number of the parsed tokens. ------------------------------------------------------------------------------- str_substr( s, startpos, length) return the given substring in 's' substr('alfa beta gamma', 3, 5) --> 'a bet' ------------------------------------------------------------------------------- str_pos_substr( s, startpos, endpos) create a substring by the given start and end position psubstr('alfa beta gamma', 3, 5) --> 'a b' ------------------------------------------------------------------------------- str_before( s, limit): the substring in 's' that precedes 'limit' str_prev('alfa beta', 'eta') --> 'alfa b' ------------------------------------------------------------------------------- str_after( s, limit) the substring that follows 'limit' str_next('alfa beta' 'alf') --> 'a beta' ------------------------------------------------------------------------------- str_trim( s, ws) trim the first character of 'ws' from both ends of 's' strtrim(' alfa beta ', ' ') --> 'alfa beta' ------------------------------------------------------------------------------- str_trim_left( s, ws) str_trl(...) ------------------------------------------------------------------------------- str_trim_right( s, ws) str_trr(...) ------------------------------------------------------------------------------- str_cond( cond, true_value, false_value) return the appropriate string, depending on 'cond' (true = nonzero value) strcond(10*10 - 100, 'alfa', 'beta') --> 'alfa' ------------------------------------------------------------------------------- isnumber( s) return 1 if 's' contains only digits isnumber('1234abc') --> 0 ------------------------------------------------------------------------------- str_first( s) return the numeric value of the first char strfirst('ALFA') --> 65 ------------------------------------------------------------------------------- str_last( s) return the last char of the string strlast('apple') --> 101 ------------------------------------------------------------------------------- str_char( s, pos) return the numeric value of the given char strchar('ALFA', 2) --> 70 ------------------------------------------------------------------------------- str_len( s) return the length of 's' strlen('alfa') --> 4 ------------------------------------------------------------------------------- str_int( s) convert the value of 's' to integer strint('12') --> 12 (as integer) ------------------------------------------------------------------------------- str_double( s) return the repeated valu of the parameter strdouble('alfa') --> 'alfaalfa' ------------------------------------------------------------------------------- str_cmp( s1, s2) compare the strings return values: -1 if s1 < s2 0 if s1 == s2 1 if s1 > s2 strcmp('alfa', 'beta') --> -1 ------------------------------------------------------------------------------- str_upper( s) return the upper case of 's' strupper('alfa') --> 'ALFA' ------------------------------------------------------------------------------- str_lower( s) strlower('Alfa') --> 'alfa' ------------------------------------------------------------------------------- str_mul( s, multiplier) return the multiplied value of 's' strmul('alfa', 3) --> 'alfaalfaalfa' ------------------------------------------------------------------------------- str_filter( s, filter) remove the characters in 'filter' from 's' strfilter('alfa', 'a') --> 'lf' ------------------------------------------------------------------------------- str_rev( s) return the string with reversed character order strrev('beta') --> 'ateb' ------------------------------------------------------------------------------- str_cat( s1, s2) the concatenated value of the string strcat('alfa', 'beta') --> 'alfabeta' (equivalent to the '+' operator for strings) ------------------------------------------------------------------------------- str_check( haystack, chars) test if the each character in 'haystack' is a member of the caharcter set defined in 'chars'. str_check('apple', 'ape') --> 0 ------------------------------------------------------------------------------- str_lcheck( haystack, chars, min_length, max_length): the same as the previous one, but the 'haystack' has to have a length between the parameters ------------------------------------------------------------------------------- str_replace( s, src, dest): replace each occurence of 'src' in 's' to 'dest'. The result is the replaced string. str_replace('Big apple, Big plum', 'Big', 'Small') --> 'Small apple, small plum' ------------------------------------------------------------------------------- time_cmp( time1, time2) compares the time strings. The format of the string mus be: 'YYYY.MM.DD:HH:MM:SS'. The values can be omitted from the right (first the secs, then minutes and so on). The resulting integer is: -1 if 'time1' is earlier than 'time2' 0 if the times are equal (times are equal if the corresponding items are equal) 1 if 'time2' is earlier than 'time1'