SingleAutoCode

Description:

script:SingleAutoCode(needle,hashSepListIn,hashSepListOut,notFoundvalue)

Looks for "needle" in the hash (#) delimited string "hasSepListIn", if found, returns the corresponding value form "hasSepListout", if not found, returns "notFoundValue".

Example:

script:SingleAutoCode(\@sys_lang,'en#dk#se#no','1#2#3#4','99')

Result:

2 if \@sys_lang=dk, if not found, 99