dolphindb中有没有类似python中format()一样的功能?

python中的format()中使用关键字参数,它们的值会指向用该名字的参数

print("我叫{name},今年{age}!".format(name="张三", age=22))

#执行结果
我叫张三,今年22!

请问dolphindb中有这样的功能吗?


请先 登录 后评论

1 个回答

chenweijian

DolphinDB中的strReplace(str, pattern, replacement)功能和上述python的format()函数功能相似,示例代码如下:

strReplace("The ball is red.""red""green")

返回:

The ball is green.
请先 登录 后评论