From 8921cf6873149470c3318515dfc467e65517566f Mon Sep 17 00:00:00 2001 From: Ben Gollmer Date: Fri, 13 Mar 2015 12:56:38 -0400 Subject: [PATCH] String.append() fixed in Xcode 6.3 Beta 3 --- CommandLine/CommandLine.swift | 4 +--- CommandLine/StringExtensions.swift | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CommandLine/CommandLine.swift b/CommandLine/CommandLine.swift index 0494e83..1c8b889 100644 --- a/CommandLine/CommandLine.swift +++ b/CommandLine/CommandLine.swift @@ -161,9 +161,7 @@ public class CommandLine { continue } - // Swift 1.2: String.append() doesn't like emoji for some reason, seems - // like a bug. Same workaround in String extension splitByCharacter() - flag = flag + String(c) + flag.append(c) } /* Remove attached argument from flag */ diff --git a/CommandLine/StringExtensions.swift b/CommandLine/StringExtensions.swift index fd9d106..946c0fc 100644 --- a/CommandLine/StringExtensions.swift +++ b/CommandLine/StringExtensions.swift @@ -95,7 +95,7 @@ internal extension String { continue } - buf = buf + String(c) + buf.append(c) } if count(buf) > 0 {