# lib_tools function library

Dependencies: install_sfo.tpa, lib_eff.tpa, lib_evaluate.tpa, lib_general.tpa, lib_internal.tpa, lib_itm.tpa, lib_list.tpa, lib_macro.tpa, lib_patch.tpa, lib_spl.tpa, lib_table.tpa, lib_text.tpa

## Description

## Public Functions

action_reinclude_this(input:s)=() action

check_component(label:s, mod:s="MOD_FOLDER")=(value:s) action
check_component(label:s, mod:s)=(value:s) patch

check_ini(ini:s)=(value:s) patch
check_ini(ini:s)=(value:s) action

check_label(label:s)=(value:s) action
check_label(label:s)=(value:s) patch

color(red:i, green:i, blue:i)=(color:s) action
color(red:i, green:i, blue:i)=(color:s) patch

consolidate_table(in:s, out:s, locabs:s="weidu_external/workspace", location:s, locbase:s)=() action

count_hundreds(counter:i, hundreds:i, task:s="files analysed")=(counter:s, hundreds:s) patch
count_hundreds(counter:i, hundreds:i, task:s="files analysed")=(counter:s, hundreds:s) action

edit_sanity_check(edits:s, editstring:s, task:s="the current task")=() action
edit_sanity_check(edits:s, editstring:s, task:s="the current task")=() patch

ensure_hex(pad_length:i, in:s)=(out:s) patch
ensure_hex(pad_length:i, in:s)=(out:s) action

find_parenthesis_range(left:s="{", right:s="}", index:s=0)=(start:s, end:s) patch

find_unique_filename(to_try:i, prefix:s="dw_", extension:s)=(filename:s) action

get_directory(location:s, locbase:s, locabs:s)=(directory:s) patch
get_directory(location:s, locbase:s, locabs:s)=(directory:s) action

get_field_value(loc:i, length:i)=(value:s) patch

get_label_loc()=(location:s) action

get_or_add_to_IDS(minimum:i=1, maximum:i=99999, to_add:s, idsfile:s)=(idsnum:s) action
get_or_add_to_IDS(minimum:i=1, maximum:i=99999, to_add:s, idsfile:s)=(idsnum:s) patch

handle_charsets_immutably(force_tra_rebuild:i, tra_base:s=lang, base_language:s=english, iconv_path:s)=(scs_tra_loc:s) action

hex_digit(digit:i)=(out:s) patch

hexify(in:i, pad_length:i, out:s)=(out:s) patch
hexify(in:i, pad_length:i)=(out:s) action

include(file:s, files:s, location:s, locbase:s, locabs:s)=() action

key_value_sanity_check(is_key:i=1, arguments:s)=() patch
key_value_sanity_check(is_key:i=1, arguments:s)=() action

list_files(location:s, locbase:s, locabs:s, postfix:s)=(list:s) action

log_this(file:s, input:s, repeat:s="yes", locabs:s="weidu_external/data/dw_talents", location:s, locbase:s)=() action
log_this(file:s, input:s, repeat:s="yes", locabs:s="weidu_external/data/dw_talents", location:s, locbase:s)=() patch

make_label(label:s)=() action

patch_reinclude_this(input:s)=() patch

process_table(cumulative:i, inline:i, table:s, location:s, locbase:s, locabs:s, function:s, ext_args:s)=(value:s) action

quicksort(list:s)=(list:s) action
quicksort(list:s)=(list:s) patch

quicksort_numerical(list:s)=(list:s) action

read_in_2da(lookup_column:i, data_column:i=1, first_row:i, file:s)=(array_data:a) action

read_rest_of_line(row:i, col:i, colmin:i)=(list:s) patch

read_variable_array()=(array_data:a) patch

recurse_through_files(base_dir:s, allowed_ext:s, function:s, arguments:s)=() action

reinclude_this(input:s)=() action
reinclude_this(input:s)=() patch

return_first_letter(input:s)=(firstletter:s, rest:s) patch
return_first_letter(input:s)=(firstletter:s, rest:s) action

return_function_and_argument(input:s)=(function:s, argument:s) patch

reverse_long(input:i)=(output:s) patch
reverse_long(input:i)=(output:s) action

run(file:s, files:s, location:s, locbase:s, locabs:s, version:s, tra:s)=() action

set_field_value(loc:i, length:i, value:i, arguments:i)=() patch

sort_array_by_function(array:s, function:s)=(sorted_array:a) action

speed_debug(var:i=4, string:s="Unspecified debug check")=() action

strip_quotes_from_string(string:s)=(string:s) patch

strip_spaces_from_string(string:s)=(string:s) patch
strip_spaces_from_string(string:s)=(string:s) action

warning(warning:s, arguments:s, repeat:s="no")=() action
warning(warning:s, arguments:s, repeat:s="no")=() patch