From 4d60140f79c7b954f007214d7945ee330b6318ae Mon Sep 17 00:00:00 2001 From: Ryusei Yamaguchi Date: Wed, 2 Sep 2015 03:48:13 +0900 Subject: [PATCH] implicit cast from CodePoint to Int and String --- unifill/CodePoint.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unifill/CodePoint.hx b/unifill/CodePoint.hx index a654b14..1896bca 100644 --- a/unifill/CodePoint.hx +++ b/unifill/CodePoint.hx @@ -41,9 +41,11 @@ abstract CodePoint(Int) { this = code; } + @:to public inline function toString() : String return InternalEncoding.fromCodePoint(this); + @:to public inline function toInt() : Int return this; }