“Other” 方法

$t.hideLastName(name, replaceStr = '*')

隐藏姓氏。

参数

name (string): 全名。

replaceStr (string): 替换字符,默认为 *。

返回

(String): 返回替换后的名字。

示例


$t.hideLastName('周瑜')        // *瑜

$t.hideLastName('诸葛亮')      // *亮

$t.hideLastName('司马懿')      // *懿

results matching ""

    No results matching ""