# string.template 库模块帮助文档

## string 成员列表 <a id="string" href="#string">&#x23;</a>

### string.template <a id="string.template" href="#string.template">&#x23;</a>
字符串模板

### string.template() <a id="string.template" href="#string.template">&#x23;</a>
[返回对象:stringTemplateObject](#stringTemplateObject)

### string.template(模板字符串,模板匹配规则) <a id="string.template" href="#string.template">&#x23;</a>
可选使用模式匹配语法指定参数匹配规则  
默认匹配规则为"\$\{(.+?)\}",匹配形如 ${参数名} 的参数

## stringTemplateObject 成员列表 <a id="stringTemplateObject" href="#stringTemplateObject">&#x23;</a>

### stringTemplateObject.* <a id="stringTemplateObject.any" href="#stringTemplateObject.any">&#x23;</a>
可用 $模板参数名 格式指定模板参数的默认值

### stringTemplateObject.format <a id="stringTemplateObject.format" href="#stringTemplateObject.format">&#x23;</a>

```aardio
stringTemplateObject.format(  
	参数名 = 值/*可选指定任意多个参数键值对用于替换模板参数*/;  
)
```

### stringTemplateObject.template <a id="stringTemplateObject.template" href="#stringTemplateObject.template">&#x23;</a>

```aardio
stringTemplateObject.template = /***  
	${模板参数}/*根据预设的格式标明参数*/  
***/
```

