From 4d63fc744a7c0cee64220f2135c4c3f91950fbd6 Mon Sep 17 00:00:00 2001 From: John Rommel Estropia Date: Mon, 26 Dec 2016 14:51:23 +0800 Subject: [PATCH] Add String overload for cs_typeName (fixes #138) --- Sources/Internal/Functions.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/Internal/Functions.swift b/Sources/Internal/Functions.swift index 68ae73e..aa75930 100644 --- a/Sources/Internal/Functions.swift +++ b/Sources/Internal/Functions.swift @@ -82,6 +82,11 @@ internal func cs_typeName(_ value: AnyClass) -> String { return "'\(value)'" } +internal func cs_typeName(_ name: String) -> String { + + return "<\(name)>" +} + internal func cs_typeName(_ name: String?) -> String { return "<\(name ?? "unknown")>"