It's generally best to set the field separator inside the script itself, simply because it means you have one less command line argument to remember to type.
一般而言,最好在脚本内部设置字段分隔符,因为这样可以少输入一个命令行参数。
The first method also takes an argument for the separator string.
第一个方法还接受一个参数来作为分隔符。
In the second case, we supply the name separator, which suggests the purpose of the argument.
在第二行中,我们提供了参数名separator,同时也暗示了参数的用处。
Having two methods seems a bit wasteful. It would be nice if we could eliminate the second joiner method and declare that the separator argument in the first joiner has a default value.
写两个函数似乎有点浪费,如果我们能消除第二个joiner方法,在第一个jioner方法里为separator参数声明一个默认值,那就太好了。
Having two methods seems a bit wasteful. It would be nice if we could eliminate the second joiner method and declare that the separator argument in the first joiner has a default value.
写两个函数似乎有点浪费,如果我们能消除第二个joiner方法,在第一个jioner方法里为separator参数声明一个默认值,那就太好了。
应用推荐