Add conversion from Dynamic to UTF8String
This commit is contained in:
@@ -313,7 +313,7 @@ abstract UTF8String(String) from String to String {
|
||||
}
|
||||
|
||||
|
||||
@:op(A >= B) static function gteq (a:UTF8String, b:UTF8String):Bool {
|
||||
@:op(A >= B) private static function gteq (a:UTF8String, b:UTF8String):Bool {
|
||||
|
||||
if (a == null) return (b == null);
|
||||
if (b == null) return true;
|
||||
@@ -322,7 +322,7 @@ abstract UTF8String(String) from String to String {
|
||||
}
|
||||
|
||||
|
||||
@:op(A + B) static function plus (a:UTF8String, b:UTF8String):UTF8String {
|
||||
@:op(A + B) private static function plus (a:UTF8String, b:UTF8String):UTF8String {
|
||||
|
||||
if (a == null && b == null) return null;
|
||||
if (a == null) return b;
|
||||
@@ -336,6 +336,13 @@ abstract UTF8String(String) from String to String {
|
||||
}
|
||||
|
||||
|
||||
@:from static function fromDynamic (value:Dynamic):UTF8String {
|
||||
|
||||
return Std.string (value);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Get & Set Methods
|
||||
|
||||
Reference in New Issue
Block a user