Skip to content

Commit

Permalink
implicit cast from CodePoint to Int and String
Browse files Browse the repository at this point in the history
  • Loading branch information
mandel59 committed Sep 1, 2015
1 parent b18e578 commit 4d60140
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions unifill/CodePoint.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 4d60140

Please sign in to comment.