apidoc::ad_keywords_score (private)
apidoc::ad_keywords_score keywords string_to_search
Defined in packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl
- Parameters:
- keywords (required)
- string_to_search (required)
- Returns:
- Number of keywords found in string to search. No additional score for repeats.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: # turn keywords into space-separated things # replace one or more commands with a space regsub -all -- {,+} $keywords " " keywords set score 0 foreach word $keywords { # turns out that "" is never found in a search, so we # don't really have to special case $word eq "" if {[string match -nocase "*$word*" $string_to_search]} { incr score } } return $scoreXQL Not present: Generic, PostgreSQL, Oracle