<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="">Hi Sergo,<div class=""><br class=""></div><div class="">isn't that what the function&nbsp;readLine(stripNewline:) in the standard library does?</div><div class=""><a href="https://developer.apple.com/library/ios/documentation/Swift/Reference/Swift_StandardLibrary_Functions/index.html#//apple_ref/swift/func/s:FSs8readLineFT12stripNewlineSb_GSqSS_" class="">https://developer.apple.com/library/ios/documentation/Swift/Reference/Swift_StandardLibrary_Functions/index.html#//apple_ref/swift/func/s:FSs8readLineFT12stripNewlineSb_GSqSS_</a></div><div class=""><br class=""></div><div class="">Alex</div><div class=""><br class=""><div class="">
–––––<br class="">Alexander Kempgen<br class=""><a href="mailto:alex@kempgen.de" class="">alex@kempgen.de</a>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">Am 25.12.2015 um 17:09 schrieb Sergo Beruashvili via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt;:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">Hello,</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">As you know lots of online coding challenge websites or University websites&nbsp;require to read data from console ( standard input ).</div><div style="margin-top: 0px; margin-bottom: 0px;" class="">To read from console in Swift,&nbsp;you could use C "scanf" or "NSFileHandle.fileHandleWithStandardInput()". but&nbsp;I found them very Time and Code consuming.&nbsp;If you check&nbsp;the language popularity in these systems&nbsp;, most of them have simple functions to read from console&nbsp;( C++ cin/cout&nbsp;, Java Scanner, Python raw_input ...etc&nbsp;) . It is especially helpful when you have limited time. And it is not only the coding challenge websites, since Swift got open-source there will be lots of command line tools implemented in Swift.</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">I`d suggest to create very simple functionality&nbsp;to manage console input/output , it would make Swift language popular for solving online coding challenges and for command line tools.</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Regards,</div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Sergo</div></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=yq8Z-2B6DbjIeYJxjP5VY6WZ0xKXr0MrPUrp8QvDyF-2BJYs4vhlqUq8Bp-2FCjnLrtkRWpNUcznFltNzyKWdEYiFpkePndnyPjqWNHrZROAErEhTQu-2FtxL3A-2FdpO6z-2FpxiJQ-2FF5N3Y2YUWfi-2FPq6AVdKwd8EriQCJnij86w4r70M-2FvobM353TnFpCV8avZL2s-2BCaZC6FUilPu5VgwUw3xY9sMYw-3D-3D" alt="" width="1" height="1" border="0" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><span class="Apple-converted-space">&nbsp;</span>_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">swift-evolution mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:swift-evolution@swift.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">swift-evolution@swift.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div></blockquote></div><br class=""></div></body></html>