# string.replaceUntilStable 库模块帮助文档

<details>  <summary>范例</summary>  <p>

```aardio 
import string.replaceUntilStable;

print( 
	//重复替换直到字符串直到替换后的字符串与替换前的字符串相同。
	string.replaceUntilStable(
		"(((x)))", //源字符串
		"%()", //模式串
		lambda (s)string.slice(s,2,-2) //替换函数，去除首尾字符
	)  
);
```

</p></details>

## string 成员列表 <a id="string" href="#string">&#x23;</a>

### string.replaceUntilStable <a id="string.replaceUntilStable" href="#string.replaceUntilStable">&#x23;</a>
使用模式匹配反复替换字符串，必须先导入才能使用。

### string.replaceUntilStable(str,pattern,repl) <a id="string.replaceUntilStable" href="#string.replaceUntilStable">&#x23;</a>
使用模式匹配反复替换字符串，  
直到替换后的字符串与替换前的字符串相同则返回替换结果。  

参数 @str 指定要替换的字符串  
参数 @pattern 指定模式串  
参数 @repl 指定替换内容（可以是字符串或函数）。  

所有参数用法以及模式语法与 string.replace 相同。
