From d3846f79707ad9f6071dd0127ece80f53e4b7c77 Mon Sep 17 00:00:00 2001 From: Ferdinand Majerech Date: Tue, 29 Jul 2014 02:00:32 +0200 Subject: [PATCH] Removed now unused function. --- source/dyaml/nogcutil.d | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/source/dyaml/nogcutil.d b/source/dyaml/nogcutil.d index 8836a0e..c4fa62f 100644 --- a/source/dyaml/nogcutil.d +++ b/source/dyaml/nogcutil.d @@ -95,29 +95,6 @@ char[] printNoGC(S...)(char[] buffer, S args) @safe pure nothrow @nogc } -/// Write a dchar to a character buffer without decoding or using the GC. -/// -/// Params: -/// -/// c = The dchar to write. Will be written as ASCII if it is in ASCII or "" -/// -/// Returns: Slice of buf containing the written dchar. -char[] writeDCharTo(dchar c, char[] buf) @safe pure nothrow @nogc -{ - const unknown = "'unknown'"; - assert(buf.length > unknown.length, "Too small buffer for writeDCharTo"); - if(c < 128) - { - buf[0] = buf[2] = '\''; - buf[1] = cast(char)c; - return buf[0 .. 3]; - } - buf[0 .. unknown.length] = unknown[] ; - return buf[0 .. unknown.length]; -} - /// A UFCS utility function to write a dchar to an AppenderNoGCFixed using writeDCharTo. /// /// The char $(B must) be a valid dchar.