<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Does the 'readline' function (introduced in Swift 2.x) work for your purposes? <a href="http://swiftdoc.org/v2.1/func/readLine/" class="">http://swiftdoc.org/v2.1/func/readLine/</a><div class=""><br class=""></div><div class="">Austin</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 6, 2015, at 9:19 PM, Kyle Bashour via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family:UICTFontTextStyleBody;font-size:17px" class="">Hi Everyone, </span><div class="" style="font-family:UICTFontTextStyleBody;font-size:17px"><br class=""></div><div class="" style="font-family:UICTFontTextStyleBody;font-size:17px">I hope this is the best place to discuss this — if not, please point me in the right direction! It seems like an appropriate topic for evolution though. </div><div class="" style="font-family:UICTFontTextStyleBody;font-size:17px"><br class=""></div><div class="" style="font-family:UICTFontTextStyleBody;font-size:17px">According to my limited knowledge and basic research, Swift doesn't currently have a simple way to read from standard input from the console. The best solution I found was <a href="http://stackoverflow.com/questions/24046952/xcode-6-swift-read-standard-input-console-to-string" class="">this StackOverflow solution</a>, but it doesn't seem to be implemented on Linux yet, and I think it should be simpler than having to use NSFileHandle if Swift is to be used as a true systems programming language.</div><div class="" style="font-family:UICTFontTextStyleBody;font-size:17px"><br class=""></div><div class="" style="font-family:UICTFontTextStyleBody;font-size:17px">Of course, if there is an easier way to do this, please let me know! Or a reason why the SO solution is the best way to do this. Thanks for reading, would love to hear thoughts on this. I also just joined the list, so if this has already been discussed, apologies. </div><div class="" style="font-family:UICTFontTextStyleBody;font-size:17px"><br class=""></div><div class="" style="font-family:UICTFontTextStyleBody;font-size:17px">-- Kyle Bashour</div><div class="" style="font-family:UICTFontTextStyleBody;font-size:17px"><br class=""></div><div class="" style="font-family:UICTFontTextStyleBody;font-size:17px">@kylebshr</div><div class="" style="font-family:UICTFontTextStyleBody;font-size:17px"><a href="http://kylebashour.com/" class="">kylebashour.com</a></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=7XtDdMHRjqIUi4tzSjSp2pWQIyxYdP6woIWn4vwV5gf-2BUUqT5djmnFf4Nxip9q2J7GjMZVvkXGn9xLICQqJ87S1sPdWFk4che4mnRLp4DaU6PU9ZHczY61rDwdSlOZCaGyUEMVzLg0sSLTEWDY7lRZogahHERrwwjvk9kFEOe-2FBvtEAOI47E8rHEyL-2BRiuhneD0wKtDd-2F3lg-2BpgARlhVtzO5d7CKSg0aS-2BVVwGauIdQ-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>