【发布时间】:2012-08-29 20:16:32
【问题描述】:
// This function converts from a hexadecimal representation to a string representation.
function hextostr($hex) {
$string = "";
foreach (explode("\n", trim(chunk_split($hex, 2))) as $h) {
$string .= chr(hexdec($h));
}
return $string;
}
我如何在 c# 中做同样的事情?
这是一个支付提供商,它只提供php中的示例代码。
【问题讨论】:
-
明确一点,十六进制表示已经是一个字符串。 “将十六进制转换为字符串”可以更改为更合适的内容。