Passing an array or a variable number of parameters to format function in scala

后端 未结 0 1152
傲寒
傲寒 2021-02-13 11:38

In Scala we can use the format method on a string and use format specifiers like example

"The %s costs %s".format(name, price.toString)


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题