<div dir="ltr">I want to find a conciseness and simplicity solution. But <span>componentsSeparatedByCharactersInSet(NSCharacterSet.whiteCharacterSet()) </span>scares me :)</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Apr 8, 2016 at 7:39 PM James Campbell <<a href="mailto:james@supmenow.com">james@supmenow.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Exactly <br><br><div>Sent from <a dir="ltr" href="http://supmenow.com" target="_blank">Supmenow.com</a></div><br></div></div><div><br><br><br>
<div class="gmail_quote">On Fri, Apr 8, 2016 at 9:38 AM -0700, "Ross O'Brien" <span dir="ltr"><<a href="mailto:narrativium+swift@gmail.com" target="_blank">narrativium+swift@gmail.com</a>></span> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="3D"ltr"">
<div dir="ltr">A function that splits by whitespace would be this:<div><br></div><div>"h j c k".componentsSeparatedByCharactersInSet(NSCharacterSet.whiteCharacterSet())</div><div><br></div><div>'componentsSeparatedByWhitespace' might be a nice addition as a shortcut for that though?</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 8, 2016 at 3:38 PM, James Campbell <span dir="ltr"><<a href="mailto:james@supmenow.com" target="_blank">james@supmenow.com</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"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000">Pehaps we could have a function that splits by whitespace.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000">"h j c k".split()</div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">
<p><b><font color="#cc0000">___________________________________</font></b></p><p><b>James⎥Alex's Minder</b></p><p><b><font color="#cc0000"><a href="mailto:james@supmenow.com" target="_blank">james@supmenow.com</a>⎥<a href="http://supmenow.com" target="_blank">supmenow.com</a></font></b></p><p><b><font size="2">Sup</font></b></p><p><b><font size="2">Runway East
</font></b></p><p><b><font size="2">10 Finsbury Square</font></b></p><p><b><font size="2">London</font></b></p><p><b><font size="2">
EC2A 1AF </font></b></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div><div>
<br><div class="gmail_quote">On 8 April 2016 at 15:05, Ross O'Brien 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">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"><div><div>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></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><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></div></div><span>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">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></span></blockquote></div><br></div></div>
<br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">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></div>
</blockquote></div><br></div>
</div>
</blockquote>
</div>
</div></blockquote></div>