<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Yes, readLine is fine,&nbsp;but I think it might not be enough</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Alexander Kempgen &lt;alex@kempgen.de&gt;<br>
<b>Sent:</b> Friday, December 25, 2015 8:42 PM<br>
<b>To:</b> Sergo Beruashvili; swift-evolution<br>
<b>Subject:</b> Re: [swift-evolution] Proposal: console input reader/handler in swift</font>
<div>&nbsp;</div>
</div>
<div>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="" id="LPlnk560479">https://developer.apple.com/library/ios/documentation/Swift/Reference/Swift_StandardLibrary_Functions/index.html#//apple_ref/swift/func/s:FSs8readLineFT12stripNewlineSb_GSqSS_</a></div>
<div id="LPBorder_GT_14510620654640.7756750241387635" style="margin-bottom: 20px; overflow: auto; width: 100%;">
<table id="LPContainer_14510620654610.4075651331804693" cellspacing="0" style="width: 90%; position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top-width: 1px; border-top-style: dotted; border-top-color: rgb(200, 200, 200); border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: rgb(200, 200, 200); background-color: rgb(255, 255, 255);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_14510620654620.5016707698814571" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_14510620654620.09976221830584109"></div>
<div id="LPTitle_14510620654630.8462081854231656" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, 'Segoe UI Light', 'Segoe WP Light', 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14510620654630.1336150609422475" href="https://developer.apple.com/library/ios/documentation/Swift/Reference/Swift_StandardLibrary_Functions/index.html#//apple_ref/swift/func/s:FSs8readLineFT12stripNewlineSb_GSqSS_" target="_blank" style="text-decoration: none;">Swift
 Standard Library Functions Reference</a></div>
<div id="LPMetadata_14510620654630.14820885099470615" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
developer.apple.com</div>
<div id="LPDescription_14510620654640.23815061547793448" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Describes the Functions .</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<div class=""><br class="">
</div>
<div class="">Alex</div>
<div class=""><br class="">
<div class="">&#8211;&#8211;&#8211;&#8211;&#8211;<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" class="" 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; font-size:12pt; background-color:rgb(255,255,255); font-family:Calibri,Arial,Helvetica,sans-serif">
<div class="" style="margin-top:0px; margin-bottom:0px">Hello,</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">As you know lots of online coding challenge websites or University websites&nbsp;require to read data from console ( standard input ).</div>
<div class="" style="margin-top:0px; margin-bottom:0px">To read from console in Swift,&nbsp;you could use C &quot;scanf&quot; or &quot;NSFileHandle.fileHandleWithStandardInput()&quot;. 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&#43;&#43; 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 class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">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 class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">Regards,</div>
<div class="" style="margin-top:0px; margin-bottom:0px">Sergo</div>
</div>
<img alt="" width="1" height="1" border="0" class="" 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; height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important; -webkit-user-select: none;" src="https://u2002410.ct.sendgrid.net/wf/open?upn=yq8Z-2B6DbjIeYJxjP5VY6WZ0xKXr0MrPUrp8QvDyF-2BJYs4vhlqUq8Bp-2FCjnLrtkRWpNUcznFltNzyKWdEYiFpkePndnyPjqWNHrZROAErEhTQu-2FtxL3A-2FdpO6z-2FpxiJQ-2FF5N3Y2YUWfi-2FPq6AVdKwd8EriQCJnij86w4r70M-2FvobM353TnFpCV8avZL2s-2BCaZC6FUilPu5VgwUw3xY9sMYw-3D-3D"><span class="" 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; float:none; display:inline!important"><span class="Apple-converted-space">&nbsp;</span>_______________________________________________</span><br class="" 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">
<span class="" 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; float:none; display:inline!important">swift-evolution
 mailing list</span><br class="" 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">
<a href="mailto:swift-evolution@swift.org" class="" 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">swift-evolution@swift.org</a><br class="" 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">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="" 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">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</body>
</html>