标签:param int continue each color return har for sci
function asc($param) { $rtn = ‘‘ $list = $param -split ‘‘ foreach ($char in $list) { if($char -ne ‘‘) { $rtn = $rtn + ("\u" + ("{0:x}" -f [int]([char]$char))) } } return $rtn }
$source="\u54ce\u5466\u4e0d\u9519\u54e6" $evaluator={ param($v) [char][int]($v.Value.replace(‘\u‘,‘0x‘)) } [regex]::Replace($source,‘\\u[0-9-a-f]{4}‘,$evaluator) write-host "Press any key to continue..." read-host
标签:param int continue each color return har for sci
原文地址:https://www.cnblogs.com/icycore/p/12072581.html