add a string replace method
This commit is contained in:
parent
591402b428
commit
12caeedf68
4 changed files with 36 additions and 3 deletions
|
|
@ -178,6 +178,16 @@ func GenFuncTable() ast.FuncTable {
|
|||
},
|
||||
},
|
||||
|
||||
"replace": &ast.Function{
|
||||
Function: Replace,
|
||||
Name: "replace",
|
||||
Args: []ast.Token_t{
|
||||
ast.STRING,
|
||||
ast.STRING,
|
||||
ast.STRING,
|
||||
},
|
||||
},
|
||||
|
||||
"substr": &ast.Function{
|
||||
Function: Substr,
|
||||
Name: "substr",
|
||||
|
|
@ -283,6 +293,7 @@ func GenFuncTable() ast.FuncTable {
|
|||
"cd": &ast.Function{
|
||||
Function: Cd,
|
||||
Name: "changedir",
|
||||
SymLazy: true,
|
||||
Args: []ast.Token_t{
|
||||
ast.STRING,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue