<div dir="ltr">Well, you can do this already:<div>let words = "rats live on no evil star".componentsSeparatedByString(" ")</div><div>so I don't know how much a shortcut is needed.</div><div><br></div><div>And given '%w' would currently be impossible in Swift as an operator containing a letter, is there a Swiftier function name or operator for this?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 8, 2016 at 2:20 PM, Arsen Gasparyan via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey guys,<div><br></div><div>Very often we need to create an array strings. It's a routine task and I really like shortcut in Ruby that shortcut makes everyday coding a little bit easier and fun:</div><div><br></div><div> words = %w[rats live on no evil star]</div><div><br></div><div>What do you think about adding something like this in Swift?</div><div><br></div><div>Cheers,</div><div>Arsen</div></div>
<br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></blockquote></div><br></div></div>