# TCCTemplate_Functions

#### Purpose

This module supports template handling Originally for TitanSIM R2 needs it for substituting substrings in a charstring template.

#### Module Parameters

-

#### Module depends on

-

#### Current Owner

Zsolt Szalai (EZSOSZA)

#### Last Review Date

-

#### Comments

Intruduction of ? regexp like behavior like \(x)? in our own pattern couses many troubles, like with the current templatefunc signature it can be impossible to determine the parameters(using 2 ? pattern) and lookup may need much more and complicated additions or rewrite that we may want at that time;

Summary

TCCTemplate_Functions | This module supports template handling Originally for TitanSIM R2 needs it for substituting substrings in a charstring template.
Functions |
f_Template_substitutetemplate | Makes the substitutions according to the dictonary given
f_Template_subsfiletemplate | Makes the substitutions in the content of the given file, according to the dictonary

### Functions

### f_Template_substitutetemplate

> function f_Template_substitutetemplate(
> | in | TCCSubstitutionList | pl_dict,
> | in | charstring | pl_string
> ) return charstring

#### Purpose

Makes the substitutions according to the dictonary given

#### Parameters

pl_dict | in TCCSubstitutionList - dictionary
pl_string | in charstring - string to substitute in

#### Return Value

charstring | substituted string

#### Errors

-

#### Detailed description

-

### f_Template_subsfiletemplate

> function f_Template_subsfiletemplate(
> | in | TCCSubstitutionList | pl_dict,
> | in | charstring | pl_file
> ) return charstring

#### Purpose

Makes the substitutions in the content of the given file, according to the dictonary

#### Parameters

pl_dict | in TCCSubstitutionList - dictionary
pl_file | in charstring - name of the file containing the template

#### Return Value

charstring | substituted string

#### Errors

From FIO | in this case “” returns

#### Detailed description

-

> function f_Template_substitutetemplate(
> | in | TCCSubstitutionList | pl_dict,
> | in | charstring | pl_string
> ) return charstring

Makes the substitutions according to the dictonary given

> function f_Template_subsfiletemplate(
> | in | TCCSubstitutionList | pl_dict,
> | in | charstring | pl_file
> ) return charstring

Makes the substitutions in the content of the given file, according to the dictonary