[英]How to convert Int to hex string?
Is it possible to convert integer to 6 digit hex code?是否可以将整数转换为 6 位十六进制代码? In AS3 I had native API在 AS3 中我有原生 API
var color:uint = 0xFF00FF;
trace("Color #" + color.toString(16)); //Color #ff00ff
Does Haxe have such functionality in standard library? Haxe 在标准库中有这样的功能吗?
您可以使用StringTools.hex()
http://api.haxe.org/StringTools.html#hex
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.