📝 docs(tsl): sync api skill with corrected codegen

Mirror docs/tsl/codegen into the bundled tsl-api-reference skill and rebuild the function index.

Remove invalid duplicate API entries for cb_delistedbydate, createhttpsession, exportJsonString, and Anova_Bartlett so exact lookup returns the canonical entries.
This commit is contained in:
csh
2026-07-07 16:47:03 +08:00
parent bbf6977f57
commit c0bf0358e0
278 changed files with 45212 additions and 35782 deletions
@@ -1,6 +1,6 @@
# 运行时 / 字符串
### `adjustLineBreaks(s, style)`
## `adjustLineBreaks(s, style)`
字符串相关函数。
@@ -11,7 +11,7 @@
返回:string
### `ansiDequotedStr(s, aquote)`
## `ansiDequotedStr(s, aquote)`
字符串相关函数。
@@ -22,7 +22,7 @@
返回:string
### `ansiIndexStr(a_text, a_values)`
## `ansiIndexStr(a_text, a_values)`
判定指定的字符串Atext可以匹配到的第一个由参数Avalues指定的字符串数组中元素索引号,就是数组的第几个元素(从0开始计算)。返回整数,如果没有找到匹配的字符串,就返回-1。与AnsiEndsText函数不同,字符串的匹配是大小写敏感的 注意:这种判定是基于大小写敏感
@@ -33,7 +33,7 @@
返回:int
### `ansiIndexText(a_text, a_values)`
## `ansiIndexText(a_text, a_values)`
判定指定的字符串Atext可以匹配到的第一个由参数Avalues指定的字符串数组中元素索引号,就是数组的第几个元素(从0开始计算)。返回整数,如果没有找到匹配的字符串,就返回-1 注意:这种判定是基于大小写不敏感
@@ -44,7 +44,7 @@
返回:int
### `ansiMatchStr(a_text, avalues)`
## `ansiMatchStr(a_text, avalues)`
判定指定的字符串Atext是否可以匹配由参数Avalues指定的字符串数组中的某个字符串。返回布尔型真假值,如果Atext匹配到了Avalues数组中的某个字符串,就返回真,否则返回假。与AnsiMatchText函数不同,字符串的匹配是大小写敏感的 注意:这种判定是基于大小写敏感
@@ -55,7 +55,7 @@
返回:bool
### `ansiMatchText(a_text, avalues)`
## `ansiMatchText(a_text, avalues)`
判定指定的字符串Atext是否可以完全匹配由参数Avalues指定的字符串数组中的某个字符串。返回布尔型真假值,如果Atext匹配到了Avalues数组中的某个字符串,就返回真,否则返回假。 注意:这种判定是基于大小写不敏感。
@@ -66,7 +66,7 @@
返回:bool
### `ansiQuotedStr(s, quote)`
## `ansiQuotedStr(s, quote)`
字符串相关函数。
@@ -77,7 +77,7 @@
返回:string
### `ansiStr2Array(value, aps)`
## `ansiStr2Array(value, aps)`
常用字符串函数相关函数。
@@ -88,7 +88,7 @@
返回:array
### `boolToStr(s)`
## `boolToStr(s)`
将布尔型转换成字符串类型并返回。参数UseBoolStrs一般为假,如果B为真,函数返回'-1',如果B为假,返回'0'。若想返回’True’与’False’的结果可用BoolToStr2实现。
@@ -98,7 +98,7 @@
返回:string
### `containsText(a_text, a_sub_text)`
## `containsText(a_text, a_sub_text)`
字符串相关函数。
@@ -109,7 +109,7 @@
返回:bool
### `dateTimeToString(format, date_time)`
## `dateTimeToString(format, date_time)`
根据参数Format给定的格式串将参数DateTime转换成字符串类型存到参数Result中,其中格式串的使用参照FormaTDateTime函数
@@ -120,7 +120,7 @@
返回:string
### `eval(exp)`
## `eval(exp)`
表达式求值。返回,表达式的值。字符串表达式中支持return。TSL.EXE支持 tsl -eval "echo 100"的模式直接调用TSL语句。 表达式允许在跨函数中传导引用参数和变量
@@ -130,19 +130,19 @@
返回:any
### `fHeader()`
## `fHeader()`
字符串,TS-OPS服务注册时需要指定的头部信息,比如TS-OPS-CALL等。 类型:读写
返回:string
### `fUrl()`
## `fUrl()`
字符串,TS-OPS服务注册地址 类型:读写
返回:string
### `importjsonstring(json)`
## `importjsonstring(json)`
将json串转化为天软数据类型。 对大无符号数据会自动转换为长整型(INT64) 注意:输入的字符串应是ASCII编码的。因为JSON标准使用UTF8编码,所以请先使用天软Utf8ToAnsi将UTF8编码的字符串缓缓为ASCII编码。可参考下面的例程。
@@ -152,7 +152,7 @@
返回:any
### `leftStr(text, num_chars)`
## `leftStr(text, num_chars)`
返回字符串从开始向左数Num_Chars个字符组成的字符串,支持多字节语言,一个汉字当成一个字符。
@@ -163,7 +163,7 @@
返回:string
### `ord(value)`
## `ord(value)`
如果是STRING类型返回value\[1\]的ASCII序号,就是value字符串的第一个字符的ASCII序号,如果为WIDESTRING,则为UNICODE码。
@@ -173,7 +173,7 @@
返回:int
### `reversebString(s)`
## `reversebString(s)`
字符串相关函数。
@@ -185,7 +185,7 @@
## 发音相关函数
### `rightStr(text, num_chars)`
## `rightStr(text, num_chars)`
前N个字符;基于所指定的字符数返回文本字符串中的最后一个或后几个字符;
@@ -196,7 +196,7 @@
返回:string
### `setChar(s, index, ch)`
## `setChar(s, index, ch)`
设置字符串/二进制流中相应位置的字符。Char为0-255之间的整数类型
@@ -208,7 +208,7 @@
返回:string
### `setLikeFlag(flag, return_value)`
## `setLikeFlag(flag, return_value)`
设置Like操作符号的正则表达式默认控制状态。默认值为1。
@@ -219,7 +219,7 @@
返回:bool
### `soundexWord(a_text)`
## `soundexWord(a_text)`
发音相关函数相关函数。
@@ -229,7 +229,7 @@
返回:int
### `str2Array(value, aps)`
## `str2Array(value, aps)`
字符串相关函数。
@@ -240,7 +240,7 @@
返回:array
### `string(value)`
## `string(value)`
将数据转换为字符串。
@@ -250,7 +250,7 @@
返回:string
### `strSubscriptTableToNormal(t, fn)`
## `strSubscriptTableToNormal(t, fn)`
字符串下标数组-->索引下标数组。
@@ -261,7 +261,7 @@
返回:array
### `strToBool(s)`
## `strToBool(s)`
如果S为'0',返回假,如果是非0的数字串,则返回真
@@ -271,7 +271,7 @@
返回:bool
### `strToCurr(s)`
## `strToCurr(s)`
将数字字符串S转换成实数返回,字符串中不允许有千分号,最大有效小数位为4位,超过四位小数的处理在不同的版本处理可能存在不一致的地方。
@@ -281,7 +281,7 @@
返回:float
### `strToDate(s)`
## `strToDate(s)`
将字符串S转换成TDateTime类型的日期
@@ -291,7 +291,7 @@
返回:datetime
### `strToDateTime(s)`
## `strToDateTime(s)`
将字符串S转换成TDateTime类型的日期和时间
@@ -301,7 +301,7 @@
返回:datetime
### `strToFloat(s)`
## `strToFloat(s)`
将数字字符串S转换成实数返回,字符串中不允许有千分号
@@ -311,7 +311,7 @@
返回:float
### `strToInt(s)`
## `strToInt(s)`
将字符串转换为整数。 支持各种进制格式字符串的转换(如二进制、十六进制等)。若只转换十进制格式字符串,可使用函数FAQ:DecToInt
@@ -321,7 +321,7 @@
返回:int
### `strToInt32(s)`
## `strToInt32(s)`
将字符串转换为32位整数。 支持各种进制格式字符串的转换(如二进制、十六进制等)。若只转换十进制格式字符串,可使用函数FAQ:DecToInt32
@@ -331,7 +331,7 @@
返回:int
### `strToInt64(s)`
## `strToInt64(s)`
将字符串转换为64位整数。 支持各种进制格式字符串的转换(如二进制、十六进制等)。若只转换十进制格式字符串,可使用函数FAQ:DecToInt64
@@ -341,7 +341,7 @@
返回:int
### `strToTime(s)`
## `strToTime(s)`
将字符串S转换成TDateTime类型的时间
@@ -351,7 +351,7 @@
返回:datetime
### `tryStrToTime(s)`
## `tryStrToTime(s)`
将字符串S转换成TDateTime类型的时间并存到参数Value中。如果转换成功,则返回真,否则返回假
@@ -361,7 +361,7 @@
返回:bool
### `unUnicodeEsc2(s)`
## `unUnicodeEsc2(s)`
字符串相关函数。
@@ -371,7 +371,7 @@
返回:string
### `unUnicodeEsc2W(s)`
## `unUnicodeEsc2W(s)`
字符串相关函数。
@@ -381,7 +381,7 @@
返回:string
### `writeFile(data_type, alias, file_name, pos, length, data)`
## `writeFile(data_type, alias, file_name, pos, length, data)`
将数据写到本地文件。文件格式可以是字符流、整数流、实数流、字节流等。 多个线程同时写入时无需加锁等操作,仅需将位置设置为-1则可保障追加模式,如果调用失败,可检测返回值为字符串后然后重试即可。(当多线程尝试打开同一个文件写入时会返回错误)
@@ -398,35 +398,35 @@
## 字符串与格式转换函数
### `floatToStrEx(r, n)`
## `floatToStrEx(r, n)`
浮点->字符串
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `r` | real | 实数 |
| `n` | integer | 整型数据,保留的小数位数 |
| 参数 | 类型 | 说明 |
| ---- | ------- | ------------------------ |
| `r` | real | 实数 |
| `n` | integer | 整型数据,保留的小数位数 |
返回:string
#### 示例
### 示例
```tsl
return floatToStrEx (12.6578, 2);
// 结果:’ 12.66
```
### `textToHtml(src)`
## `textToHtml(src)`
将字符串转化为HTML标准格式的串
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ----- | ------ | ---------- |
| `src` | string | 字符串类型 |
返回:string
#### 示例
### 示例
```tsl
src := "The First LETTER won\'t be replaced by \'one\', but the Second letter will.";
@@ -435,17 +435,17 @@ return textToHtml(src);
The First LETTER won't be replaced by 'one', but the Second letter will.
```
### `textToUrl(a_src)`
## `textToUrl(a_src)`
将字符串转化为URL标准格式的串
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | ------ | ---------- |
| `a_src` | string | 字符串类型 |
返回:string
#### 示例
### 示例
```tsl
a_src := "#abcd 10";
@@ -453,17 +453,17 @@ return textToUrl(a_src);
// 结果:%23abcd%20%2010
```
### `htmlToText(src)`
## `htmlToText(src)`
将HTML标准格式的串转化为文本字符串
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ----- | ------ | ---------- |
| `src` | string | 字符串类型 |
返回:string
#### 示例
### 示例
```tsl
Src := "The First LETTER won't be replaced by 'one', but the Second letter will.";